#GESP2445. [GESP]L5-202406-Q2445-S
[GESP]L5-202406-Q2445-S
给定如下函数:
int fun(int n) {
if (n == 1) return 1;
if (n == 2) return 2;
return fun(n - 2) - fun(n - 1);
}
则当 时,函数返回值为( )。
{{ select(1) }}
- 0
- 1
- 21
- -11
相关
在下列比赛中:
给定如下函数:
int fun(int n) {
if (n == 1) return 1;
if (n == 2) return 2;
return fun(n - 2) - fun(n - 1);
}
则当 n=7 时,函数返回值为( )。
{{ select(1) }}