include iostream using namespace std int Use_Akkerman int int int Akk_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
using namespace std;
int Use_Akkerman(int m, int n);
int Akk_point(int m, int n) {
if (m == 0) return n + 1;
else if (n > 0) return Use_Akkerman(m - 1, Use_Akkerman(m, n - 1));
else return Use_Akkerman(m - 1, 1);
}
int Use_Akkerman(int m, int n) {
if (m == 0) return Akk_point(0, n);
else if (n > 0) return Akk_point(m - 1, Akk_point(m, n - 1));
else return Akk_point(m - 1, 1);
}
int main() {
cout << Akk_point(2, 2);
return 0;
}