下面运行程序后,单击命令按钮,输出的结果是 【 】 。
Private Sub Command1_Click()
Dim a%(1 To 5),i%, s#
For i=1 To 5
a(i)=i
Next
s=Fun(a)
Print "s="; s;
End Sub
Function Fun(a() As Integer)
Dim t#, i%
t=1
For i=LBound(a) To UBound(a)
t=t a(i)
Next
Fun=t
End Function
第1题:
下面运行程序后,单击命令按钮,输出出的结果是【 】。
Private Sub Command1_Click( )
Dim a% (1 To 5) ,i%, s
For i = 1 To 5
a(i) =i
Next
s = Fun(a)
Print"s="; s;
End Sub
Function Fun(a() As Integer)
Dim t, i%
t=1
For i = LBound(A0To UBound(a)
t=t * a(i)
Next
Fun =t
End Function
第2题:
在窗体上有一个命令按钮,然后编写如下事件过程。 Private Sub Command1_Click() Dim a(5)As String FOR i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next For Each b h a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是
A.ABCDE
B.1 2 3 4 5
C.abcde
D.出错信息
第3题:
下面程序运行后,单击命令按钮,输出的结果是______。
Private Sub Command1_Click()
Dim a%(1 To 5),i%,s
For i=1 To 5
a(i) =i
Next
s=Fun(A)Print "s=";s;
End Sub
Function Fun(a() As Integer)
Dim t,i%
t=1
For i=LBound(A)To UBound(A)t=t*a(i)
Next
Fun=t
End Function
第4题:
在窗体画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a(5)As String For i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是______。
A. ABCDE
B.1 2 3 4 5
C.abcde
D.出错信息
第5题:
在窗体上有一个命令按钮,然后编写如下事件过程:
Private Sub Command1Click( )
Dim a(5)As String
For i=1,To 5
a(i)=Chr(Asc("A")+(i-1))
Next i
For Each b In a
Print b;
Next
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A.ABCDE
B.1 2 3 4 5
C.abcde
D.出错信息