( 21 )命令按钮 Command1 的单击事件过程的代码如下:Private Sub Command1_Click( )Dim a ( 30 ) As IntegerFor i=1 To 30a(i)=Int(Rnd*100)NextFor Each arrItem In aIf arrItem Mod 7=0 Then Print arrItem;If arrItem90 Then Exit ForNextEnd Sub对于该事件过程,下列叙述中错误的是( )。A ) a 数组中的数据是 30 个 100 以内的整数B )语句 For Each arrItem In a 有语法错误C ) If arrItem Mod 7=0 …… 语句的功能是输出数组中能够被 7 整除的数D ) If arrItem90 …… 语句的作用是当数组元素的值大于 90 时退出 For 循环

( 21 )命令按钮 Command1 的单击事件过程的代码如下:

Private Sub Command1_Click( )

Dim a ( 30 ) As Integer

For i=1 To 30

a(i)=Int(Rnd*100)

Next

For Each arrItem In a

If arrItem Mod 7=0 Then Print arrItem;

If arrItem>90 Then Exit For

Next

End Sub

对于该事件过程,下列叙述中错误的是( )。

A ) a 数组中的数据是 30 个 100 以内的整数

B )语句 For Each arrItem In a 有语法错误

C ) If arrItem Mod 7=0 …… 语句的功能是输出数组中能够被 7 整除的数

D ) If arrItem>90 …… 语句的作用是当数组元素的值大于 90 时退出 For 循环


相关考题:

设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a(3,3)As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i,4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A.20B.7C.16D.17

设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a As IntegerFor i=1 To 30a(i)=iNextFor Each arrItem 【 】aIf arrItem Mod 7=0 Then Print arrItem;If arritem90 Then Exit ForNextEnd Sub请填空。

单击命令按钮Command1必将调用已写在()事件中的代码。A.LostFocusB.KeyPressC.DbclickD.Click

设有命令按钮Command1的单击事件过程,代码如下,请填空。Private Sub Command1_Click()Dim a(30) As IntegerFor i=1 To 30a(i) =iNextFor Each arrItem______aIf arrItem Mod 7=0 Then Print arrItem;If arrItem>90 Then Exit ForNextEnd Sub

在窗体中有一个名为(Command1的命令按钮,Click事件的代码如下:单击命令按钮后,标签显示的结果是( )。

设有命令按钮Commandl的单击事件过程,代码如下:运行程序,单击命令按钮,消息框输出结果是( )。A. 7B. 8C. 15D. 22

设有如下通用过程:在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如 下事件过程:End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A. 30B. 25C. 20D. 15

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:Private Sub Command1_Click()Static x as integerX=f(x+5)ClsPrint xEnd SubPrivate function f(x as integer)as integerF=x+xEnd function连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是A)10B)30C)60D)70

在窗体上面有一个命令按钮,名称为Command1,单击该命令按钮时,执行如下事件过程:在弹出信息框的标题栏中显示的信息是( )。A.softwareand hardwareB.softwareC.hardwareD.1

设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下: Private Sub Command1 Click( ) Static x A S Integer x=f(x+5) Cls Print X End Sub Private Function f(x As Integer)As Integer f=x+x End Function 连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是( )。A.10B.30C.60D.70