Guest User

Untitled

a guest
Jul 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int f91( int N )
  5. {
  6. if( N <= 100 )
  7. return f91( f91( N+11 ) );
  8. else
  9. return N-10;
  10. }
  11.  
  12. int main()
  13. {
  14. int N;
  15. while( cin >> N && N != 0 )
  16. cout << "f91(" << N << ") = " << f91(N) << endl;
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment