Skip to content

Instantly share code, notes, and snippets.

@calee0219
Created January 21, 2017 19:34
Show Gist options
  • Save calee0219/4507055a480d33c7769d93d61233d3e3 to your computer and use it in GitHub Desktop.
Save calee0219/4507055a480d33c7769d93d61233d3e3 to your computer and use it in GitHub Desktop.
#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