fork download
  1. #include <stdio.h>
  2.  
  3. int func(int x, int y, int z){
  4. static int count=0;
  5. int i;
  6. int xx=1,yy=1;
  7. if(x==0&&y==0&&z==0){
  8. return count;
  9. }
  10. count++;
  11. for(i=0;i<z;i++){
  12. xx*=x;
  13. yy*=y;
  14. }
  15. return xx+yy;
  16. }
  17.  
  18. int main(void) {
  19. int i;
  20. for(i=1;i<5;i++) func(i,i,i);
  21. printf("%d\n", func(0,0,0));
  22. return 0;
  23. }
Success #stdin #stdout 0s 5312KB
stdin
0
0
0
0
stdout
4