在窗体上添加一个命令按钮Command1,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Integer, s As Integer a = 8 s = 1 Do s = s + a a = a - 1 Loop While a <= 0 Print s; a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是()。A.7 9B.34 0C.9 7D.死循环

在窗体上添加一个命令按钮Command1,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Integer, s As Integer a = 8 s = 1 Do s = s + a a = a - 1 Loop While a <= 0 Print s; a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是()。

A.7 9

B.34 0

C.9 7

D.死循环


参考答案和解析
C

相关考题:

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub subl(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x*x+y*y End Sub Private Sub Command1_Click() Dim a As Integer a=8 Call subl(1, 2,a) Print a End Sub 程序运行后,单击命令按钮,则窗体下显示的内容是______。A.8B.2C.5D.11

在窗体中添加一个命令按钮,名称为Command1,然后编写如下程序: Private Sub Command1_Click() Dim a As Integer, b As String, c As Integer a=1234: b=Str(a)c=Len(b)Print c End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是______。A.0B.5C.6D.7

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a S="VisualBasic" Print String(3, a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是______。A.VVVB.VisC.sicD.11

在窗体中添加一个命令按钮,名称为Command1,然后编写如下程序:Private Sub Command1_Click()Dim s,iFor i=1 To 10s=s+iNext iMsgBox sEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为 。

在窗体上画一个名称为Commandl的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(By Val m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Commandl_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A. 6B.7C.8D.9

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程:Private Function fun(ByVal m As Integer)If m Mod 2 = 0 Thenfun = 2Elsefun = 1End IfEnd FunctionPrivate Sub Command1_Click()Dim i As Integer, s As Integers = 0For i = 1 To 5s = s + fun(i)NextPrint sEnd Sub程序运行后,单击命令按钮,在窗体上显示的是( )。A.6B.7C.8D.9

在窗体中有一个命令按钮command1,编写事件代码如下: Private Sub Command1_Click() Dim s As Integer s=P(1)+P(2)+P(3)+P(4) Debug.Print s End Sub Public Function P(N As Integer) Dim Sum As Integer Sum=0 For i=1 To N Sum=Sum+1 Next i P=Sum End Function 打开窗体运行后,单击命令按钮,输出的结果是( )。A.15B.20C.25D.35

在窗体上有一个命令按钮Commandl,通用过程fun和命令按钮的事件过程如下: Private Function fun(By m As Integer) If m Mod 2=0 Then fun=2 Else Fun=1 Else If End Funcion Private Sub Commandl_Click() Dim i Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出A.6 B.7 C.8 D.9

在窗体上画—个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim num As Integer num=1 Do Until num>6 Print num; num=num+4 Loop End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是_________。A.13.45.8B.1 3 5C.147D.无数据输出

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MSgBox x End Sub Private Sub s1() x=x+20 End Sub Private Sub s2() Dim x As Integer x=X+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为______。A.10B.30C.40D.50

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Prirate Sub Command1_Click() s = 0 For i=1 To 13 x = i * i-1 If x Mod 3 = 0 Then s = s + 1 Next i Print s End Sub 程序运行后,单击命令按钮,则窗体中显示的内容是A.1B.5C.27D.45

在窗体上画一今名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Integer,s As Integer a=8 s=1 Do s=s+a a=a-1 Loop While a<=0 Print s;a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是 ______。A.79B.340C.97D.死循环

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序:Private Sub s(ByVal p As Integer)p=p*2End SubPrivate Sub Command1_click()Dim i As Integeri=3Call s(i)If i>4 Then i=i^2MsgBox iEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为【 】。

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Integer,s As Integer a = 8 s = 1 Do s = s + a a = a - 1 Loop While a<=0 Print s,a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.7 9B.34 0C.9D.死循环

在窗体上绘制一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程; Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_C1ick() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A.6B.7C.8D.9

在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下:Private Function fun(ByVal m As Integer)Ifm Mod2=0 Thenfun=2Elsefun=1End IfEnd FunctionPrivate Sub Command1_Click()Dim i As Integer,s As Integers=0For i=1 To 5s=s+fun(i)NextPrintsEnd Sub程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

在窗体中添加一个名为Command1的命令按钮,然后编写如下程序:Private Sub s(By Val p As Integer)p=p*2End SubPrirate Sub Command1_Click( )Dim i As Integeri=3Call s(i)If i>4 Then i=i^2MsgBox IEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为______。

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function f(m As Integer) If m Mod 2 = 0 Then f = m Else f = 1 End If End Function Private Sub Command1_Click() Dim i As Integer s = 0 For i = 1 To 5 s = s + f(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是A. 11B.10C.9D.8

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MsgBox x End Sub Private Sub sl() x=x+20 End Sub Private Sub s2() Dim x As Integer x=x+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。A.10B.30C.40D.50

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x(5)As String Dim n AS Integer For n : 4 TO 0 Step -1 x(n)= n + 1 Print x(n); Next n End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.54321B.4C.54321D.0

在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下: Private Function fun(ByVal m As Integer) If m Mod 2 = 0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Cliek() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

在窗体上画—个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim num As Integer num=1 DO Until num>6 Print num; num=num+2.4 Loop End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是 ______。A.13.45.8B.1 3 5C.1 4 7D.无数据输出

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x * x+ y * y End Sub Private Sub Command1_Click() Dim a As Integer a = 8 Call sub1(1, 2,A)Print a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.8B.2C.5D.11

在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,a As Integer Do While i<20 Do While True If i Mod 10=0 Then Exit Do Else i=i-1 End If Loop i=i+11 a=a+i Loop Printa End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.21B.32C.33D.11

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click( ) Dim i As Integer,s As Integer S=0 For i=1 To 5 s=s+fun(i) Next Print 3 End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9

在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim j As Integer,s As Integer s=1 Do s=s+j j=j+1 Loop Until j>=5 Print s End Sub 程序运行后,单击命令按钮,在窗体上输出的结果是( )。A.11B.1C.16D.7

在窗体上面一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Integer, s As Integer a=8 s=1 Do s=s+a a=a-1 Loop While a<=0 Print s; a End Sub 程序运行后,单击命令按钮.则窗体上显示的内容是______。A.7 9B.34 0C.9 7D.死循环