fork(8) download
  1. #include<stdio.h>
  2.  
  3. int counter=0;
  4.  
  5. int calc (int a, int b) {
  6. int c;
  7. counter++;
  8. if(b==3) return (a*a*a);
  9. else {
  10. c = calc(a, b/3);
  11. return (c*c*c);
  12. }
  13. }
  14.  
  15. int main() {
  16. int k;
  17. k=calc(4, 81);
  18. printf("%d\n", counter);
  19. printf("%d",k);
  20. }
Success #stdin #stdout 0s 5560KB
stdin
Standard input is empty
stdout
4
0