下面程序运行后,单击命令按钮,输出的结果是______。Private Sub Command1_Click()Dim a%(1 To 5),i%,sFor i=1 To 5a(i) =iNexts=Fun(A)Print "s=";s;End SubFunction Fun(a() As Integer)Dim t,i%t=1For i=LBound(A)To UBound(A)t=t*a(i)NextFun=tEnd Function

下面程序运行后,单击命令按钮,输出的结果是______。

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


相关考题:

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是。Private Sub Command1_Click()Dim aa = Array(1,2,3,4,5)For K = 1 To 4 S = S + a(K)Next K Print SEnd SubA. 10 B. 14 C. 15 D. 120

在窗体上画一个名称为 \Command1\ 的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As StringA="123456789"For i=1 To 5Print Space(6-i);Mid $ (a,______ ,2*i-1)Next iEnd Sub程序运行后,单击命令按钮,窗体上的输出结果是5456345672345678123456789请填空。

在窗体中添加一个命令按钮,名称为Command1,然后编写如下程序:Private Sub Command1_Click()Dim s,iFor i=1 To 10s=s+iNext iMsgBox sEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为 。

在窗体上有一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a(5) As StringFOR i=1 To 5a(i) =Chr(Asc("A") +(i-1))NextFor Each b In aPrint b;NextEnd Sub程序运行后,单击命令按钮,输出结果是A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是 Private Sub Commandl_Click() Dim a a=Array(1,2,3,4,5) Fork=1 To 4 s=s+a(k) Next k Print s End Sub A.10 B.14 C.15 D.120

阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext i End Sub Private Sub Command1_Click()Dim a (1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。

下面运行程序后,单击命令按钮,输出的结果是 【 】 。Private Sub Command1_Click()Dim a%(1 To 5),i%, s#For i=1 To 5a(i)=iNexts=Fun(a)Print "s="; s;End SubFunction Fun(a() As Integer)Dim t#, i%t=1For i=LBound(a) To UBound(a)t=t  a(i)NextFun=tEnd Function

阅读下列程序: Function func(n As Integer)As Integer Sum = 0 For i = 1 To n Sum = Sum + (i + 1)* i Next i func = Sum End Function.Private Sub Command1_Click () Dim a As Integer a= 5 s = func (A)Print s End Sub 程序运行后,单击命令按钮,输出的结果为A.80B.60C.70D.15

在窗体上有一个命令按钮Command1,编写事件代码如下:Private Sub Command1_Click()Dim a(10),P(3) As Integerk=5For i=1 To 10For i=1 To 3For i=1 To 3End Sub打开窗体运行后,单击命令按钮,消息框中输出的结果是( )。

在窗体上添加一个命令按钮(名为Command1),然后编写如下程序:Private Sub Command1_Click()Dim a As Integer,b As Integerx=10y=20End Sub打开窗体运行后,单击命令按钮,消息框的输出结果为( )。

窗体上有一个命令按钮,命令按钮的单击事件过程如下: Private Sub Command1_Click() Dim a a=Array(1,2,3,4,5) For k=1 To 4 s=s+a(k) Next Print S End Sub 运行程序后,单击命令按钮,输出结果是A.10B.14C.15D.120

阅读下列程序: Private Sub Command1_Click( ) Dim i As Integer,k As Integer k=2 For i=1 To 3 Print H(k); Next i End Sub Function H(j As Integer) a=0 Static b a=a+1 b=b+1 H=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356

在窗体上画一个命令按钮(名称为Command1),编写如下事件过程: Private Sub Command1_Click() b=5 c=6 Print a=b+c End Sub 程序运行后,单击命令按钮,输出的结果是: ______。A.a=11B.a=b+cC.a=D.假

阅读下面的程序: Private Sub Command1_Click() For i=1 To 3 For j=1 To i For k=j To 3 x=x+1 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,窗体上输出的结果是A.3B.9C.14D.21

设有如下程序: Dim a()As Integer Private Sub Command1_Click() n=-5:m=6 ReDim a(n To m) For i=LBound(a,1)To UBound(a,1) a(i)=i Next i Print a(LBound(a,1));a(UBound(a,1)) End Sub 程序运行后,单击命令按钮,则输出结果是 ______。A.0 0B.-5 0C.-5 6D.0 6

下面运行程序后,单击命令按钮,输出出的结果是【 】。Private Sub Command1_Click( )Dim a% (1 To 5) ,i%, sFor i = 1 To 5a(i) =iNexts = Fun(a)Print"s="; s;End SubFunction Fun(a() As Integer)Dim t, i%t=1For i = LBound(A0To UBound(a)t=t * a(i)NextFun =tEnd Function

假定有如下的Sub过程: Sub Func(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=6 b=5 Func(a, B) Print a, b End Sub 程序运行后,单击命令按钮,输出结果为 ______。A.6 5B.1 1C.1.2 5D.1.2 1

窗体上有一个命令桉钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。Private Sub Command1_click()Dim aa=Array(1,2,3,4,5)Fork=1 To 4S=S+a(k)Next kPrint SEnd SubA.10B.14C.15D.120

假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=2 S a,b print a,b End Sub 程序运行后,单击命令按钮,输出结果是( )。A.5 2B.1 1C.1.25 4D.2.5 1

假定有如下的Sub过程:Sub Sub1(x As Single,y As single)t=xx=t/yy=t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_click()Dim a As SingleDim b As Singlea=5b=4Sub1 a,bPrint a;bEnd Sub程序运行后,单击命令按钮,输出结果为A.B.C.D.

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim a(5)As String Fori=1 To 5 a(i)=Chr(Asc("A")+(11)) Nexti For Each b In a Print b Next End Sub 程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息

在窗体上画一个名为Command1的命令按钮,然后编写下列程序:Option Base 1Private Sub Command1_Click()Dim ArrArr=Array(1,2,3,4,5)j=1For i=5 To 1 Step-1S=S+Arr(i)*jj=j*10NextPrint SEnd Sub程序运行后,单击命令按钮,输出结果是( )。A.54321B.123C.12345D.345

窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。 Private Sub Command1_Click() Dim a a=Array(1, 2, 3, 4, 5) Fork= 1 To 4 s=s+a(k) Next k Print s End SubA.10B.14C.15D.120

在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim j As Integer,s As Integer s=1 Do s=s+j j=j+1 Loop Until j>=5 Print s End Sub 程序运行后,单击命令按钮,在窗体上输出的结果是( )。A.11B.1C.16D.7

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a(5)As String For i=1 T0 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是______。A.ABCDEB.1 2 3 4 5C.abodeD.出错信息

在窗体上画一个命令按钮,然后编写如下程序 Private Sub Command1_Click( ) Dim a As Integer,b As hiteger a=1 b=2 Print N(a,B)End Sub Function N(x As Integer,y As Integer)As Integer N=IIf(xy,x,y) End Function 程序运行后,单击命令按钮,输出结果为A.1B.2C.5D.8

( 11 )在窗体中添加一个命令按钮,名称为 Command1 ,然后编写如下程序:Private Sub Command1_Click()Dim s , iFor i=1 To 10s=s+iNext iMsgBox sEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为 【 11 】 。