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