fork download
  1. #include <stdio.h>
  2. int func(int x, int y, int z);
  3. int main(void)
  4. {
  5. int i;
  6. for( i = 1; i < 5; i++ )
  7. {
  8. func(i,i,i);
  9. }
  10. printf("%d\n", func(0, 0, 0));
  11. return 0;
  12.  
  13. }
  14. int func(int x, int y, int z)
  15. {
  16. int i,ans,xtmp = x,ytmp = y;
  17. int static scount;
  18. scount = 0;
  19. if(x==0 && y==0 && z==0)
  20. {
  21. return scount;
  22. }
  23. else
  24. {
  25. for(i=0;i<z-1;i++)
  26. {
  27. x *= xtmp;
  28. y *= ytmp;
  29. }
  30. ans = x + y;
  31. scount++;
  32. return ans;
  33. }
  34. }
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
0