#GESP2446. [GESP]L5-202406-Q2446-S
[GESP]L5-202406-Q2446-S
给定如下函数(函数功能同上题,增加输出打印):
int fun(int n) {
cout << n << " ";
if (n == 1) return 1;
if (n == 2) return 2;
return fun(n - 2) - fun(n - 1);
}
则当 时,屏幕上输出序列为( )。
{{ select(1) }}
- 4 3 2 1
- 1 2 3 4
- 4 2 3 1 2
- 4 2 3 2 1
相关
在下列比赛中: