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