enamsustcse

10696 f91

May 1st, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int f91 (int n);
  4.  
  5. int main()
  6. {
  7.     int n, num;
  8.  
  9.     while(scanf("%d", &n) == 1)
  10.     {
  11.         if(n == 0)break;
  12.         num = f91(n);
  13.         printf("f91(%d) = %d\n", n, num);
  14.     }
  15.     return 0;
  16. }
  17.  
  18. int f91 (int n)
  19. {
  20.     if (n >= 101) return n - 10;
  21.     else return 91;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment