在窗体中添加一个命令按钮,编写如下程序: Private Sub Sub1(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub1:";p;m;n End Sub Private Sub Command1_Click() a1=1:b=2:c1=3 Call Sub1(a,b1+3,c1) Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为A.Sub: 2 6 4 Main: 2 6 4B.Sub: 2 6 4 Main: 2 6 4C.Sub: 2 6 4 Main: 1 2 3D.Sub: 2 6 4 Main: 2 2 3

在窗体中添加一个命令按钮,编写如下程序: Private Sub Sub1(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub1:";p;m;n End Sub Private Sub Command1_Click() a1=1:b=2:c1=3 Call Sub1(a,b1+3,c1) Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为

A.Sub: 2 6 4 Main: 2 6 4

B.Sub: 2 6 4 Main: 2 6 4

C.Sub: 2 6 4 Main: 1 2 3

D.Sub: 2 6 4 Main: 2 2 3


相关考题:

( 11 )在窗体中添加一个名称为 Command1 的命令按钮,然后编写如下事件代码:Private Sub Command1_Click( )Dim x As Integer, y As Integerx=12 : y=32Call p(x, y)MsgBox x*yEnd SubPublic Sub p (n As Integer, By Val m As Integer)n=n Mod 10m=m Mod 10End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为 ___________ 。

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim m As Integer, n As Integer, p As Integerm=3: n=5: p=0Call Y(m, n, p)Print Str(p)End SubSub Y(ByVal i As Integer, ByVal j As Integer, k As Integer)k=i + jEnd Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.4B.6C.8D.10

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub CommaLndl_Click() For n=1 To 20 If n Mod 3<>0 Then m=m+n\3 Next n Print n End Sub 程序运行后,如果单击命令按钮,则窗体上显示的内容是______。A.15B.18C.21D.24

在窗体上添加一个命令按钮(名为Conunand1)和一个文本框(名为Text1),并在命令按钮中编写如下事件代码: Private Sub Command1_Click() m=2170 n=Len (Str$ (m) +Space (5)) Me! Text1=n End Sub打开窗体运行后,单击命令按钮,在文本框中显示( )。A.5B.8C.9D.10

运行以下程序后,输出结果为_____________。 Private Sub Command1_Click() a=1:b=2:c=3 Call test(a,b+3,(c)) Print "main:";a;b;c End Sub Private Function test(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub:";p;m;n End Function:A. sub:2 6 4 main:1 2 3B. sub:2 6 4 main:2 2 3C. sub:2 6 4 main:2 6 4D. sub:2 6 4 main:1 6 4

在窗体中添加一个名称为Com1的命令按钮,然后编写如下程序:Private Sub s(ByVal p As Integer)p=p*2End SubPrivate Sub Com1_Click()Dim i As Integeri=3Call s(i)If i>4 Then i=i^2End sub窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click( ) Dim m As Integer,n As Integer,p As Integer m=3:n=5:p=O Call Y(m,n,p) Print Str(p)End SubSub Y(ByVal i As Integer,ByVal j As Integer,k As Integer) k=i + jEnd Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是A.4B.6C.8D.10

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim m As Integer, n As Integer, p As Integer m=3: n=5: p=0 Call Y(m, n, p) Print Str(p) End Sub Sub Y(ByVal i As Integer, ByVal j As Integer, k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )A.4B.6C.8D.10

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1 Click() a = 2 For i=1 To 3 Call funl(i,A)Next i x = i + 2 Print x;a End Sub Private Sub fun1(n,m) m=m + n * 2 n = n + m End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.1 5B.4 5C.8 4D.3 4

在窗体中添加一个命令按钮,编写如下程序: Private Sub Subl(p,m,n) p=p+1:m=m+1:n=n+1 Print"subl:";p;m;n End Sub Private Sub Command1_Click() al=1:b=2:c1=3 Call Subl(a,b1+3,c1) Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为A.Sub:2 6 4 Main:2 6 4B.Sub:2 6 4 Main:2 6 4C.Sub:2 6 4 Main:1 2 3D.Sub:2 6 4 Main:2 2 3

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim in As Integer,n As Integer,p As Integer m=3:n=5:p=0 Call Y(m,n,p) Print Str(p) End Sub Sub Y(ByVal i As Integer,ByVal j As Integer,k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是A.4B.6C.8D.10

在窗体上画—个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click_() For n=1 To 20 If n Mod 3<>0 Then m=m+n\3 Next n print n End Sub 程序运行后,如果单击命令按钮,则窗体上显示的内容是 ______。A.15B.18C.21D.24

在窗体上添加一个名称为Command1的命令按钮,然后编写如下事件代码: Private Sub Command1_Click( ) Dim a(10,10) For m=2 To 4 For n=4 TO 5 a(m,n)m*n Next n Next m MsgBox a(2,4)+a(3,5)+a(4,5) End Sub 打开窗体运行后,单击命令按钮,则消息框的输出结果是( )。A.23B.33C.43D.53

在窗体中添加一个名称为Command1的命令按钮,然后编写如下事件代码: Private Sub Command1_Cliek() Dim a(10, 10) For m = 2 To 4 For n = 4 To 5 a(m, n) = m*n Next n Next m MsgBox a(2, 5)+a(3, 4)+a(4,5) End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果是( )。A.22B.32C.42D.52

假定有如下的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.

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Call sub1(-15.1,2.54) End Sub Public Function sub1(a As Integer,ByVa1 b As String) As Integer a=Val(B)sub1=a Print sub1 End Function 程序运行后,单击命令按钮,在窗体上输出的是A.3B.2C.-15D.提示出错

在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() For n = 1 To 20 If n Mod 3 <> 0 Then m = m + n \ 3 Next n print n End Sub 程序运行后,如果单击命令按钮,则窗体上显示的内容是A.15B.18C.21D.24

在窗体中添加一个命令按钮,编写如下程序: Private Sub Test(p,m,n) p=p+1:m=m+1:n=n+1 Print "Sub: ";p;m;n End Sub Private Sub Command1.Click() a1=1:b=2:c1=3 Call Test((a,b1+3,(c1)) Print "Main:";a1;b1;c1 End Sub 程序运行后,输出结果为A.Sub: 2 6 4 Main: 2 6 4B.Sub: 2 6 4 Main: 2 6 4C.Sub: 2 6 4 Main: 1 2 3D.Sub: 2 6 4 Main: 2 2 3

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

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(p,m,n) p=p + 1 : m = m + 1 : n =n + 1 Print p;m;n End Sub Private Sub Command1_Click() x=6 : y=4 : z=2 Call sub1(x,y+1,(z)) Print x;y;z End Sub 程序运行后,单击命令按钮,则窗体上第二行显示的内容是A.7 6 3B.7 4 2C.6 4 2D.4 6 3

当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End SubA.7 75 66 60 7 80 126 60B.7 75 66 60 7 75 126 60C.7 75 66 60 7 80 66 60D.7 75 66 60 7 75 66 60

在窗体中添加一个命令按钮,编写如下程序:Private Sub Sub1(p,m,n)p=p+1:m=m+1:n=n+1Print "sub1:";p;m;nEnd SubPrivate Sub Command1_Click()a1=1:b=2:c1=3Call Sub1(a,b1+3,c1)Print"Main:";a1;b1;c1End Sub程序运行后,输出结果为A.Sub: 2 6 4 Main: 2 6 4B.Sub: 2 6 4 Main: 2 6 4C.Sub: 2 6 4 Main: 1 2 3D.Sub: 2 6 4 Main: 2 2 3

在窗体中添加一个名称为Commandl的命令按钮,然后编写如下事件代码:Private Sub Commandl Click( ) MsgBox f(24,18)End Sub Public Function f(m As Integer,n As Integer)As"integerDo While mn Do While mn m=m-n Loop Do While mn n=n-m Loop Loop f=m End Function 窗体打开运行后,单击命令按钮,则消息框的输出结果是( )。A.2B.4C.6D.8

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x * x+ y * y End Sub Private Sub Command1_Click() Dim a As Integer a = 8 Call sub1(1, 2,A)Print a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.8B.2C.5D.11

在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x As Integer,y As Integer x = 41: y = 54 Call sub1(x,y) x = x + 1 Print x; y End Sub Private Sub sub1(n As Integer, ByVal m As Integer) n=n Mod 10 m=m\10 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.41 54B.2 54C.1 3D.42 3

在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Forn=1 To 20 If n Mod 3<>Thenm=m+n\3 Next n Print n End Sub 程序运行后,如果单击命令按钮,则窗体上显示的内容是______。A.15B.18C.21D.24

在窗体中添加一个名称为Commandl的命令按钮,然后编写如下事件代码:Private Sub Command1_Click()Dim x As Integer,y As Integerx=12:y=32Call p(x,y)MsgBox x*yEnd SubPublic Sub p(n As Integer,By Val m As Integer)n=n Mod 10m=m Mod 10End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为【 】。