Problem Description
source:https://uva.onlinejudge.org/external/106/10696.html
McCarthy is a famous theorician of computer science. In his work, he defined a recursive function, called f91, that takes as input a positive integer N and returns a positive integer defined as follows:
• If N ≤ 100, then f91(N) = f91(f91(N + 11));
• If N ≥ 101, then f91(N) = N − 10.
Write a program, that computes McCarthy’s f91.
source:https://uva.onlinejudge.org/external/106/10696.html
McCarthy is a famous theorician of computer science. In his work, he defined a recursive function, called f91, that takes as input a positive integer N and returns a positive integer defined as follows:
• If N ≤ 100, then f91(N) = f91(f91(N + 11));
• If N ≥ 101, then f91(N) = N − 10.
Write a program, that computes McCarthy’s f91.