سلام
من کدش رو درزبان c براتون می ذارم. امیدوارم که به دردتون بخوره
unsigned int ackermann(unsigned int m, unsigned int n) {
else if (n == 0) /* m will be > 0 here */
return ackermann(m-1, 1);
else /* both m and n will be > 0 */
return ackermann(m-1, ackermann(m, n - 1));
صورت کلی تابع رو هم میذارم شاید باقی دوستان بتونن کمکی بکنن