A.1+1/2+1/3+1/4
B.1+1/2+1/(3×2)+1/(4×3×2)
C.1+1/2+1/3+1/4+1/5
D.1+1/2+1/(3×2)+1/(4×3×2)+1/(5×4×3×2)
解析:由算法框图依次可得,输入N=4,
T=1,S=1,k=2,2<4;
T=1/2,S=1+1/2,k=3,3<4;
T=1/(3×2),S=1+1/2+1/(3×2),k=4,4=4;
T=1/(4×3×2),S=1+1/2+1/(3×2)+1/(4×3×2),k=5,5>4;
输出S=1+1/2+1/(3×2)+1/(4×3×2).
答案:B
7.循环结构的算法框图如图所示,下列说法中正确的是 .
①A是循环变量初始化,循环将要开始;
②B为循环体;
③C是判断是否继续循环的条件;
④A可以省略不写.
答案:①②③