设有如下通用过程: Public Sub Fun(a( ),ByVal x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下的事件过程: Private Sub Command1_Click( ) Dimsn(5)As Variant For i=1 To 5 arc(i)=i Next n=10 Call Fun(arr( ),n) Textl.Text=n End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是A.10B.15C.25D.24
设有如下通用过程: Public Sub Fun(a( ),ByVal x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下的事件过程: Private Sub Command1_Click( ) Dimsn(5)As Variant For i=1 To 5 arc(i)=i Next n=10 Call Fun(arr( ),n) Textl.Text=n End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是
A.10
B.15
C.25
D.24
相关考题:
设有如下通用过程: Public FunctionFun(x Str As String)As String DimtStr As String,strL As Integer tStr="" strL=Len(xStr) i=1 DoWhilei<=strL/2 tStr=tStrMid(xStr,i,1)Mid(xStr,strL-i+1,1)" i=i+1 Loop Fun=tStr End Function 在窗体A.ABCDEFB.abcdefC.AFBECDD.DEFABC
设有如下通用过程: Public Sub Fun(a() As Integer, x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5)As Integer, n As Integer For i=1 To 5 art(i)=i+i Next Fun arr, n Text1. Text=Str(n) End Sub 程序运行后,单击命令按钮,在文本框中显示的内容是______。A.30B.25C.20D.15
在窗体上画一个名称为Commandl的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(By Val m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Commandl_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A. 6B.7C.8D.9
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮。然后编写如下的事件过程: Private Sub Commandl_Click() Dim arr(5)As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是______。A. 30B.25C.20D.15
在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程:Private Function fun(ByVal m As Integer)If m Mod 2 = 0 Thenfun = 2Elsefun = 1End IfEnd FunctionPrivate Sub Command1_Click()Dim i As Integer, s As Integers = 0For i = 1 To 5s = s + fun(i)NextPrint sEnd Sub程序运行后,单击命令按钮,在窗体上显示的是( )。A.6B.7C.8D.9
设有如下通用过程:Public Sub Fun(a() As Integer, x As Integer)For i = 1 To 5x = x + a(i)NextEnd Sub在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程:Private Sub Command1_Click()Dim arr(5) As Integer, n As IntegerFor i = 1 To 5 arr(i) = i + iNext Fun arr, n Text1.Text = Str(n)End Sub程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A.30B.25C.20D.15
在窗体上有一个命令按钮Commandl,通用过程fun和命令按钮的事件过程如下: Private Function fun(By m As Integer) If m Mod 2=0 Then fun=2 Else Fun=1 Else If End Funcion Private Sub Commandl_Click() Dim i Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出A.6 B.7 C.8 D.9
设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
设有如下通用过程: Public Sub Fun(a(),By Val x As Integer) Fori=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮,然后编写如下的事件过程: Private Sub Commandl_Chck() Dimart(5)As Variant Fori=1 To 5 arr(i)=iA.10B.15C.25D.24
现有如下程序: Private Sub Command1_Click() s=0 For i=1 To 5 s=s+f(5+i) Next Print s End Sub Public Function f(x As Integer) If x>=10 Then t=x+1 Else t=x+2 End If f=t End Function 运行程序,则窗体上显示的是( )。A.38B.49C.61D.70
有如下函致: Function fact(x As Integer)As Long Dim p As Long,i As Integer p=1 For i=1 To x p=p*1 Next fact=p End Function 调用它的事件过程如下: Private Sub Command1_Click() i=Val(Inputbox("请输入数据")) a=fact((i)) Print a End Sub 若输入数据5,则运行结果为A.120B.60C.80D.100
有如下函数过程: Function lj(x As Integer) As Long Dim s As Long Dim i As Integer s=0 For i = 1 To x s=s+ i Next i 1j= s End Function在窗体上添加一个命令按钮,名为Command1, 编写事件过程调用该函数: Private Sub Command1 Click() Dim i As Integer Dim sum As Long For i = 1 To 5 sum = sum + 1j(i) Next i Print sum End SubA. 25B.35C.45D.55
设有如下通用过程: Public Sub Fun(a(), ByVal x As Integer) For i=1 To 5 x = x + a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下的事件过程: Private Sub Commandl Click() Dim arr(5) As Variant For i=1 To 5 arr(i) =i Next n = 10 Call Fun(arr(), n) Text1.Text=n End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是A.10B.15C.25D.24
在窗体上绘制一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9
单击一次命令按钮之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() a = fun(4) + fun(5) Print a; End Sub Public Function fun (n As Integer) Static Num For i = 1 To n Num = Num + i Next i fun = Num End FunctionA.15B.20C.35D.40
在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.0 3 7 5B.0 1 2 3C.3 2 4 5D.0 5 8 3
在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程; Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_C1ick() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A.6B.7C.8D.9
单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End SubA.3 4 7 5 6B.3 5 7 4 5C.1 2 3 4 5D.1 2 3 5 7
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.rehcaetB.tahreeeC.themeeD.eerthea
设有如下通用过程: Public Sub Fun(a(),ByVal x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5)As Variant For i=1 To 5 arr(i)= i Next n=10 Call Fun(arr(),n) Text1.Text=n End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是 ______。A.10B.15C.25D.24
单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub
在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下:Private Function fun(ByVal m As Integer)Ifm Mod2=0 Thenfun=2Elsefun=1End IfEnd FunctionPrivate Sub Command1_Click()Dim i As Integer,s As Integers=0For i=1 To 5s=s+fun(i)NextPrintsEnd Sub程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9
编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.6B.12C.24D.47
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer For n = 0 To 9 Step 3 Print rel(n); Next n End Sub Private Function rel(ByVal i As Integer)As Integer Dim x As Integer x = 0 For j = 1 To i If i < 5 Then rel = i: EXit Function x = x + i Next i rel = x End Function 程序运行后,单击命令按钮,则窗体上显示的内容是A.1 3 5 7B.2 8 14 53C.0 3 21 45D.0 5 11 34
在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下: Private Function fun(ByVal m As Integer) If m Mod 2 = 0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Cliek() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上绘制一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5) As Integer,n AsInteger For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A.30B.25C.20D.15
在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click( ) Dim i As Integer,s As Integer S=0 For i=1 To 5 s=s+fun(i) Next Print 3 End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9