Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int A (int x, int y)
  3. {
  4. if (x==0)
  5. return y+1;
  6. else if (y==0)
  7. A(x-1,1);
  8. else
  9. A(x-1,A(x,y-1));
  10. }
  11. int main ()
  12. {
  13. int x, y;
  14. printf("Input x: "); scanf("%d", &x);
  15. printf("Input y: "); scanf("%d", &y);
  16. printf("%d",A (x,y));
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement