fork download
  1. #include<stdio.h>
  2.  
  3. int foo(int n) {
  4. int i,sum=0;
  5. if(n==0) {
  6. return 1;
  7. }
  8. else {
  9. for(i=0;i<n;i++) {
  10. sum += foo(i);
  11. }
  12. return sum;
  13. }
  14. }
  15.  
  16. int main() {
  17.  
  18. int k = foo(3);
  19.  
  20. printf("%d",k);
  21. return 0;
  22. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
4