fork(9) download
  1. #include <stdio.h>
  2. int foo(int *,int);
  3. int k=5;
  4. int foo(int *x,int c)
  5. {
  6. int res=1;
  7. c=c-1;
  8. if(c==0)
  9. return 1;
  10.  
  11. *x=*x+1;
  12. res=foo(x,c);
  13. return res*(*x);
  14. }
  15.  
  16. int main(void) {
  17.  
  18. printf("\n%d",foo(&k,k));
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
6561