习题 1.依次在输入5、4、3、2、1、-1,输出结果是? Private Sub Command Click O X=0 Do Until x =-1 a=va1( InputBox(“请输入A的值”)) b=va1( InputBox(“请输入B的值”)) x=Va1( InputBox(“请输入X的值”)) a=a+b+x print a Loop End sub输出两个结果,分别是12和2
习 题 1. 依次在输入5、4、3、2、1、-1,输出结果是? Private Sub Command_Click() X=0 Do Until x = -1 a=Val(InputBox(“请输入A的值”)) b=Val(InputBox(“请输入B的值”)) x=Val(InputBox(“请输入X的值”)) a=a+b+x print a Loop End Sub 输出两个结果,分别是12和2
习题 2.依次在输入5、4、3、2、1、-1,输出结果为」 Private Sub Command Click O) X=0 Do Until x=-1 a=val( InputBox(“请输入A的值”) b=val( InputBox(“请输入B的值”) x=val( InputBox(“请输入X的值”)) a=a+b+x Loop print a End sub 输出结果只有一个,2
习 题 2. 依次在输入5、4、3、2、1、-1,输出结果为_______ Private Sub Command_Click() X=0 Do Until x=-1 a=Val(InputBox(“请输入A的值”)) b=Val(InputBox(“请输入B的值”)) x=Val(InputBox(“请输入X的值”)) a=a+b+x Loop print a End Sub 输出结果只有一个,2
习题 3.运行下列程序,单击窗体,则执行结果是() Private Sub Form Click O s=0 Do s=(s+1)*(s+2) Number= Number+1 Loop Until s >=30 Print number s End Sub A)01B)3030C)430(D)3182
3. 运行下列程序,单击窗体,则执行结果是() Private Sub Form_Click() s=0 Do s=(s+1)*(s+2) Number= Number+1 Loop Until s >= 30 Print Number ;s End Sub A) 0 1 B) 30 30 C) 4 30 D) 3 182 习 题
习题 4.运行下列程序,单击窗体,则执行结果是() Private Sub Form Click O b=1 a=2 Do While b 10 b=2*atb Loop Print b End Sub A)13B)17c)21D)33
4. 运行下列程序,单击窗体,则执行结果是() Private Sub Form_Click() b=1 a=2 Do While b < 10 b=2*a+b Loop Print b End Sub A) 13 B) 17 C) 21 D) 33 习 题
习题 5.运行下列程序,单击窗体,则执行结果是 Private Sub form Click O a.=100 Do s=s t a a=a+1 Loop While a>111 Print a End sub 结果:a=101
习 题 5. 运行下列程序,单击窗体,则执行结果是 Private Sub Form_Click() a = 100 Do s = s + a a = a + 1 Loop While a > 111 Print a End Sub 结果:a=101