Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Last active November 5, 2019 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinglunliao/7776f894ab74366f9cff to your computer and use it in GitHub Desktop.
Save pinglunliao/7776f894ab74366f9cff to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
long f91(int n)
{
if( n >= 101 )
return n - 10;
else
return 91;
}
int main()
{
int n;
while( cin >> n )
{
if( n == 0 )
break;
long result = f91(n);
cout << "f91(" << n << ") = " << result << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment