题目内容:
在窗体上添加一命令按钮,名称为Command1,然后为该命令按钮编写如下事件过程,该过程的执行结果为
Option Base 1
Private Sub Command1_Click()
Dim a As Variant
a=Array(1,2,3,4)
j=1
For i=4 To 1 Step-1
s=s+a(i)*j
j=j*10
Next
Print s
End Sub
A.4321
B.1234
C.34
D.12
参考答案:
答案解析:
在窗体上添加一命令按钮,名称为Command1,然后为该命令按钮编写如下事件过程,该过程的执行结果为
Option Base 1
Private Sub Command1_Click()
Dim a As Variant
a=Array(1,2,3,4)
j=1
For i=4 To 1 Step-1
s=s+a(i)*j
j=j*10
Next
Print s
End Sub
A.4321
B.1234
C.34
D.12