Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int f91(int theinput);
- int main()
- {
- int input;
- int output;
- while(cin>>input)
- {
- if(input!=0)
- {
- output = f91(input);
- cout<<"f91("<<input<<") = "<<output<<endl;
- }
- else
- break;
- }
- return 0;
- }
- int f91(int theinput)
- {
- if(theinput>=101)
- return theinput-10;
- else
- return f91(f91(theinput+11));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement