若s、i均为整型变量,执行下列程序段后s的值为 ______。 s=0 i=1 Do s=s+i i=i+1 Loop Until i>5@答案@15@[评析]@本题考查了Do...Loop Until控制语句。每执行一次循环,变量s加一次变量i,随后变量i再加一次1,直到变量5大于5时终止循环。i的初始值为1,故Do循环执行5次。相应的,变量s分别加1、2、3、4、5,故答案为15。
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】听力原文:M: You're redecorating your apartment, aren't you? How is it coming along? W: Oh, I'm just taking it one step at a time. Q: What does the woman imply? (16)
【单选题】听力原文:M: Janis, you're redecorating your apartment, aren't you? How is coming alone? W: I'm just taking it one step at a time. Q: What does the woman imply? (16)