设执行以下程序段时依次输入1,3,5,执行结果为( )。 Dim a(4) As Integer,b(4) As Integer For K=0 To 2 a(K+1)=Val(InputBox(“请输入数据:”)) b(3-K)=a(K+1) Next K Print b(K)
查看答案
执行以下Command1的Click事件过程结果( )。 Option Base 0 Private Sub Command1_Click() Dim a a=Array(“a”,”b”,”c”,”d”,”e”,”f”,”g”) Print a(1);a(3);a(5) End Sub
A. abc
B. bdf
C. 出错
D. ace
在窗体上画一个命令按钮Command1,然后编写如下代码: Private Sub Command1_Click() Dim arr1(10), arr2(10) As Integer n = 3 For i = 1 To 5 arr1(i) = i arr2(n) = 2 * n + i Next i Print arr1(n),arr2(n); End Sub 程序运行后,单击命令按钮,输出结果是( )。
A. 3 11
B. 11 3
C. 3 13
D. 13 3
下列程序段的运行结果是( )。 Private Sub Command1_Click() Dim a(3) As Long a(0) = 1: a(1) = 2: a(2) = 3: a(3) = 4 j = 1 For i = 3 To 0 Step -1 s = s + a(i) * j j = j * 10 Next i Print s End Sub
A. 12
B. 4321
C. 1234
D. 34
有如下程序代码,输出结果是( )。 Dim a() a=Array(1,2,3,4,5) for i=Lbound(a)to Ubound(a) print a(i); next I
A. 4 3 2 1 0
B. 5 4 3 2 1
C. 0 1 2 3 4
D. 1 2 3 4 5