#include #include using namespace std; int Ack(int m, int n); const int M_LIMIT = 3; const int N_LIMIT = 4; int main() { int m,n; cout << "m\\n"; for(n=0;n<= N_LIMIT; n++) { cout << setw(4) << n; } cout << endl; for(m=0; m<= M_LIMIT; m++) { cout << setw(4) << m; for(n=0;n<= N_LIMIT; n++) { cout << setw(4) << Ack(m,n); } cout << endl; } return 0; } 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)); } }