Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // G - Guess the function, you geek!
- // Date : 11.05.19
- #include<iostream>
- #include<cstdio>
- using namespace std;
- int f91(int n){
- if(n >= 101) return n-10;
- else if(n <= 100){
- f91(f91(n+11));
- //f91(n+10);
- }
- }
- int main(){
- int n;
- while(scanf("%d", &n) == 1 && n != 0){
- if(n <= 101)printf("f91(%d) = %d\n", n,91);
- else printf("f91(%d) = %d\n", n,n-10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement