运行下列程序,显示的结果是 Private Sub Command34_Click() i=0 DO i=i+1 Loop While i<10 MsgBox i End Sub

admin2018-10-18  24

问题 运行下列程序,显示的结果是
    Private Sub Command34_Click()
    i=0
    DO
    i=i+1
    Loop While i<10
    MsgBox i
    End Sub

选项 A、0
B、1
C、10
D、11

答案C

解析 依据题意可知,当执行完第10次循环体后,此时i的值为10,while的条件为假,所以跳出循环,所以最终的结果为10。
转载请注明原文地址:https://kaotiyun.com/show/r8Mp777K
0

最新回复(0)