Untitled
unknown
c_cpp
2 years ago
257 B
6
Indexable
#include <iostream>
int Akkerman(int m,int n) {
if (m == 0) return n + 1;
if (n == 0) return Akkerman(m - 1, 1);
return Akkerman(m - 1, Akkerman(m, n - 1));
}
int main(){
int n, m;
std::cin >> m >> n;
std::cout << Akkerman(m, n);
}Editor is loading...
Leave a Comment