[填空题] 有如下事件过程: Private Sub Form Active ( ) Dim Score (1 to 3) As Integer Dim i As Integer Di

[填空题] 有如下事件过程: Private Sub Form Active ( ) Dim Score (1 to 3) As Integer Dim i As Integer Di,第1张

[填空题] 有如下事件过程: Private Sub Form Active ( ) Dim Score (1 to 3) As Integer Dim i As Integer Di

[填空题] 有如下事件过程:

Private Sub Form Active ( )

Dim Score (1 to 3) As Integer

Dim i As Integer

Dim t As Variant

Fori=3 To 1 step-1

Score (i) = 2 * i

Next

For Each t In Score

Print t

Next

End Sub

程序运行后窗体上显示的值为 【14】

正确答案:

24 6

参考解析:

本题考查了数组的定义和For Each…Next语句。题中定义了下标下界为1下标上界为3的Score数组,通过For循环语句赋值后,再通过For Each… Next语句在窗体上输出数组中的每个成员。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5614078.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存