fork download
  1. #include <stdio.h>
  2.  
  3. int number(int a){
  4. int ans=0;
  5. if(a==0){
  6. return 0;
  7. }
  8. else{
  9. ans=number(a-1)*number(a-1)+1;
  10. return ans;
  11. }
  12. }
  13. int main(void) {
  14. printf("%d\n", number(1));
  15. printf("%d\n", number(2));
  16. printf("%d\n", number(3));
  17. printf("%d\n", number(4));
  18. printf("%d\n", number(5));
  19. printf("%d\n", number(6));
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1
2
5
26
677
458330