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 = 0;
  18. if(x==0 && y==0 && z==0)
  19. {
  20. return scount;
  21. }
  22. else
  23. {
  24. for(i=0;i<z-1;i++)
  25. {
  26. x *= xtmp;
  27. y *= ytmp;
  28. }
  29. ans = x + y;
  30. scount++;
  31. return ans;
  32. }
  33. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
4