【名词&注释】
操作系统(operating system)、显示器(display)、关键字、关键是、扫描仪(scanner)、输出设备(output device)、速度快(fast)、磁盘存储器(disc storage)、要注意(should be noticed)
[单选题]已知递归函数f(n)的功能是计算1+2+…+n,且n1,应采用的代码段是______。
A. if n>1 then return 1 else return n+f(n-1)
B. if n>1 then return 1 else return n+f(n+1)
C. if n1 then return 0 else return n+f(n-1)
D. if n1 then return 0 else return n+f(n+1)
B. 10 C. 20 D. 32
B. 6 C. 8 D. 14