在一个窗体上添加命令按钮控件,名为Command1,事件过程如下,则该过程的执行结果为______。Option Base 1Private Sub Command1_ Click() Dim a(5)As Integer Dim k As Integer Dim Total As Integer a (1)= 2 a (2)= 5 a (3)= 4 a (4)= 10 a (5)= 6 for k =1 To 5 Total = Total +a(k) Next k Print TotalEnd Sub
A.10
B.15
C.27
D.35
第1题:
在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程:
Private Sub Command1_Cliek
Dim b, k
For k = 1 to 6
b=23+k
Next k
MsgBox b + k
End Sub
打开窗体后,单击命令按钮,消息框的输出结果是【 】。
第2题:
在一个窗体上添加一命令按钮控件,名为Command1,事件过程如下,则该过程的执行结果是( )。 option base 1 Private Sub Command1_Ctick() Dim a (5) As Integer Dim k As Integer Dim total As Integer a(1)=2 a(2)=5 a(3)=4 a(4)=10 a(5)=6 For k=1 To 5 total=total+a(k) Next k Print total End Sub
A.10
B.15
C.27
D.35
第3题:
( 15 )在窗体上添加一个命令按钮(名为 Command1 ),然后编写如下事件过程:
Private Sub Command1_Click ()
Dim b,k
For k=1 to 6
b=23+k
Next k
MsgBox b+k
End Sub
打开窗体后,单击命令按钮,消息框的输出结果是 【 15 】 。
第4题:
在窗体上添加一个命令按钮,名为Command1,然后为该命令按钮编写如下事件过程,该过程执行结果为______。Option Base 1Private Sub Cemmand1_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 i Print sEnd Sub
A.4321
B.1234
C.34
D.12
第5题:
在一个窗体上添加一个命令按钮控件,名为Command1,事件过程如下,则执行结果是( )。 Option Base 1 Private Sub Command1_Cliek() Dim a(5) As Integer Dim k As Integer Dim tota1 As Integer a(1)=2 a(2)=5 a(3)=4 a(4)=10 a(5)=6 Fork=1 To 5 tota1=tota1+a(k) Next k Print total End Sub
A.10
B.15
C.27
D.35