#include #include using namespace std; unsigned long Ack(unsigned long m, unsigned long n); const int COL_WIDTH = 9; int main() { int m,n; cout << " Ack(m,n)"; for(n = 0; n < 5; n++) { cout << setw(COL_WIDTH) << n ; } cout << endl; for (m = 0; m < 4; m++) { cout << setw(COL_WIDTH) << m; for(n = 0; n < 5; n++) { cout << setw(COL_WIDTH) << Ack(m,n); } cout << endl; } return 0; } unsigned long Ack(unsigned long m, unsigned long n) { if (m == 0) { return n+1; } if (n == 0) { return Ack(m-1, 1); } else { return Ack(m-1, Ack(m, n-1)); } }