有如下事件过程: Private Sub Form_Active() Dim Score(1 to 3) As Integer Dim i As Integer Dim t As Variant For i=3 To 1 step-1

admin2010-11-20  31

问题 有如下事件过程:
Private Sub Form_Active()
Dim Score(1 to 3) As Integer
Dim i As Integer
Dim t As Variant
    For i=3 To 1 step-1
    Score(i)=2*i
Next
For Each t In Score
    Print t
Next
End Sub
程序运行后窗体上显示的值为【  】。

选项

答案2 4 6

解析 本题考查数组的定义和For Each 匩ext语句。题中定义了下标下界为1,下标上界为3的Score数组,通过For循环语句赋值后,再通过For Each 匩ext语句在窗体上输出数组中的每个成员。
转载请注明原文地址:https://jikaoti.com/ti/JQg0FFFM
0

最新回复(0)