遞迴_f91

 avatar
user_3763047219
c_cpp
2 years ago
283 B
2
Indexable
int f91(int n);


int f91(int n) {
    if (n <= 100) {
        return f91(f91(n + 11));
    }
    else {
        return n - 10;
    }
}

#include <stdio.h>


int main() {

    int n;
    scanf("%d", &n);
    printf("f91(%d) = %d\n", n, f91(n));
    return 0;

}
Editor is loading...