1 2 3 4 5 6 7 8 9 10 11 | #include <cstdio> using namespace std; inline int fun(int x){ if(x==0||x==1)return 3; else return x-fun(x-2); } int main(){ printf("%d",fun(9)); putchar('\n'); return 0; } |
0 of 4 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 4 Questions answered correctly
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、将04行改为if(x<=1) return(7 & 3);程序输出结果不变。( )
2、将03行的inline去掉,程序可以正常运行。( )
3、程序输出结果为( )
4、8行的fun(9)改成fun(10),输出为( )