fork download
  1. #include <stdio.h>
  2.  
  3. int foo(int x, int y)
  4. {int a=0, b=1;
  5. if (x==0)
  6. return 1;
  7. a=x%10, b=x/10;
  8. y=y+a;
  9. foo(b, y);
  10. printf("%d", y);return 1;
  11. }
  12.  
  13. int main()
  14. {
  15. int a=512, s=1;
  16. int r = foo(a, s);
  17. printf("%d", r);
  18. return 0;
  19. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
9431