Created
January 21, 2017 19:34
-
-
Save calee0219/4507055a480d33c7769d93d61233d3e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int f91(int x) | |
{ | |
if(x >= 101) return x-10; | |
return f91(f91(x + 11)); | |
} | |
int main() | |
{ | |
int n; | |
while(~scanf("%d",&n) && n) { | |
printf("f91(%d) = %d\n", n, f91(n)); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment