Q1-

mail@pastecode.io avatar
unknown
c_cpp
6 days ago
330 B
4
Indexable
Never
#include <iostream>

using namespace std;

int f91(int N) {
    if (N >= 101) {
        return N - 10;
    } else {
        return 91;
    }
}

int main() {
    int N;
    while (cin >> N) {
        if (N == 0) {
            break;
        }
        cout << "f91(" << N << ") = " << f91(N) << endl;
    }
}
Leave a Comment