网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

在窗体中添加一个名称为Command1的命令按钮、一个名称为Label1的标签,编写如下代码: Option Base 1 Private Sub Command1_Click( ) a=Array(23,34,25,46,35) ┊ End Sub 过程的功能是求数组a中是奇数的元素的个数,并把结果显示在标签中。为实现此功能,省略号处的程序段应该是

A.For i=0 T0 4 If a(i)Mod 2<>0 Then b=b+1 End lf Next i Label1.Caption=b

B.For i=0 To 4 If a(i)Mod2=0 Then b=b+1 End lf Next i Label1.Caption=b

C.For i=1 To 5 If a(i)Mod 2 ◇Then b=b+1 End lf Next i Label1.Caption=b

D.For=0 To 5 If a(i)Mod 2=0 Then b=b+1 End lf Next i Label1.Caption=b


参考答案

更多 “ 在窗体中添加一个名称为Command1的命令按钮、一个名称为Label1的标签,编写如下代码: Option Base 1 Private Sub Command1_Click( ) a=Array(23,34,25,46,35) ┊ End Sub 过程的功能是求数组a中是奇数的元素的个数,并把结果显示在标签中。为实现此功能,省略号处的程序段应该是A.For i=0 T0 4 If a(i)Mod 2<0 Then b=b+1 End lf Next i Label1.Caption=bB.For i=0 To 4 If a(i)Mod2=0 Then b=b+1 End lf Next i Label1.Caption=bC.For i=1 To 5 If a(i)Mod 2 ◇Then b=b+1 End lf Next i Label1.Caption=bD.For=0 To 5 If a(i)Mod 2=0 Then b=b+1 End lf Next i Label1.Caption=b ” 相关考题
考题 在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序:

考题 在窗体中添加一个命令按钮(名称为Command1),然后编写如下代码: Private Sub Command1_Click() a=0:b=5:c=6 MsgBox a=b+c End Sub 窗体打开运行后,如果单击命令按钮,则消息框的输出结果为______。A.11B.a=11C.0D.False

考题 在窗体中添加一个名称为Coml的命令按钮,然后编写如下程序:

考题 在窗体上画两个名称分别为Label1和Label2的标签,再画一个名称为Command1的命令按钮,然后编写如下事件过程:运行上面的程序,单击命令按钮.其输出结果是A.8 9B.8 18C.64 9D.64 18

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

考题 在窗体中添加一个命令按钮(名称为Command1),然后编写如下代码: Private Sub Command1_Click() a=3:b=4:c=5 MsgBox a=b+c End Sub 窗体打开运行后,如果单击命令按钮,则消息框的输出结果为( )。A.0B.9C.a=9D.假

考题 在窗体上画一个名称为Command1的命令按钮、一个名称为Label1的标签,然后编写如下事件过程; Private Sub Command1_Click() s=0 For i=1 to 15 x=2*i-1 If x Mod 3=0 Then s=s+1 Next i Label1. Caption=s End Sub 程序运行后,单击命令按钮,则标签中显示的内容是______。A.1B.5C.27D.45

考题 ( 11 )在窗体中添加一个命令按钮(名称为 Command1 ),然后编写如下代码:Private Sub Command1_Click( )Static b As Integerb=b+1End Sub窗体打开运行后,三次单击命令按钮后,变量 b 的值是 【 11 】 。

考题 在窗体中添加一个命令按钮(名称为Command1),然后编写如下代码: Private Sub Command1_Click() a=0:b=5:c=6 MsgBox? a=b+c End Sub 窗体打开运行后,如果单击命令按钮,则消息框的输出结果为()。A.11B.a=11C.0D.假

考题 在窗体上画一个名称为Command1的命令按钮和一个名称为Label1的标签,然后编写如下程序代码: Option Base 0 Private Sub Command1_Click() Dim a(5) As Integer, n As Integer For i = 0 To 5 a(i) = i n = n + a(i) Next i Label1 = n End Sub 运行程序,单击命令按钮,在标签中显示的内容是________。A.5B.10C.15D.20