Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int Ack (int m, int n)
- {
- if (m == 0)
- return n + 1;
- else if (n == 0)
- return Ack (m - 1, 1) ;
- else
- return Ack (m - 1, Ack (m, n - 1) ) ;
- }
- void main ( )
- { int m, n;
- printf("m : ");
- scanf("%d",&m);
- printf("n : ");
- scanf("%d",&n);
- printf ("Answer = %d", Ack (m,n) ) ;
- }
Add Comment
Please, Sign In to add comment