Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. long f91(int n)
  6. {
  7. if( n >= 101 )
  8. return n - 10;
  9. else
  10. return 91;
  11. }
  12.  
  13. int main()
  14. {
  15. int n;
  16. while( cin >> n )
  17. {
  18. if( n == 0 )
  19. break;
  20. long result = f91(n);
  21. cout << "f91(" << n << ") = " << result << endl;
  22. }
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement