题目
题型:不详难度:来源:
A.17 | B.19 | C.21 | D.23 |
![](http://img.shitiku.com.cn/uploads/allimg/20191101/20191101011121-66447.png)
答案
经过第二次循环得到S=9,i=5
经过第三次循环得到S=13,i=7
经过第四次循环得到S=17,i=9
此时i=9,不满足循环的条件i<8,执行输出S=17
故选A.
核心考点
举一反三
A.-1 | B.0 | C.1 | D.2 |
![](http://img.shitiku.com.cn/uploads/allimg/20191101/20191101011059-41751.png)
![](http://img.shitiku.com.cn/uploads/allimg/20191101/20191101011051-51393.png)
A.-3 | B.-
| C.
| D.2 |
A.9 | B.3 | C.10 | D.6 |
![](http://img.shitiku.com.cn/uploads/allimg/20191101/20191101011042-52166.png)
(1)若输入x的值为2,根据该程序的运行过程完成下面的表格,并求输出的i与x的值;
A.17 | B.19 | C.21 | D.23 |
A.-1 | B.0 | C.1 | D.2 |
A.-3 | B.-
| C.
| D.2 |
A.9 | B.3 | C.10 | D.6 |