网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End Sub

A.6 6 12 7 11 11

B.8 5 10 5 11 11

C.9 6 12 9 10 15

D.8 10 10 5 9 10


参考答案

更多 “ 单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10 ” 相关考题
考题 单击命令按钮时,下列程序的执行结果为( )。 Private Sub Commandl_Click() Dimx As Integer,y As Integer x=12: y=32 CallPCS(x,y) PrintX;y End Sub PubUc Sub PCS(ByValn As Integer,ByValm As Integer) n=nMod 10 m=mMod 10 End SubA.1232B.232C.23D.123

考题 在窗体上画一个命令按钮,然后编写如下程序: Sub S1(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Private Sub Command1_Click() Dim a As Integer,b As Integer a=10 b=30 S1 a,b Print"a=";a;"b=";b End Sub 程序运行后,单击命令按钮,输出结果是 ______。A.a=30 b=10B.a=30 b=30C.a=10 b=30D.a=10 b=10

考题 在窗体上画1个命令按钮,名称为Command1,然后编写如下程序: Dim Flag As Boolean Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(“请输入:”) If Flag Then Print f(intNum) End If End Sub Function f(X as Integer)As Integer If X<10 Then Y=X Else Y=X+10 End If f=Y End Function Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=True End Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为______。A.0B.5C.15D.无任何输出

考题 下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()A.23B.19C.21D.22

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

考题 在窗体上画一个命令按钮,其名称为Commandl,然后编写如下程序:Function a(x As Integer, y As Integer) As Integera = IIf(x > y, x, y)End FunctionPrivate Sub Command1_Click()Dim n As Integer, m As Integern = 10m = 20Print a(n, m)End Sub程序运行后,单击命令按钮,输出结果是______。

考题 单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 `B.9 5 10 6101051010C.9 6 12D.9 10 10 910155410

考题 有如下程序: Private Sub Commandl_Click( ) Dim i As Integer For i=1 To 2 DS Next i End Sub Sub DS( ) Dim x As Integer,m As String Static y,n X=X + 1 y=y + 1 m=m "*”:n=n"#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * #B.1 1 * #C.1 1 * # 1 1 * # 1 2 * #D.1 1 * # 1 1 * ## 1 2 * ##

考题 在窗体上有一个命令按钮Commandl,编写事件代码如下:Private SuB commandl_Click()Dim x As Integer,y As Integerx=12:y=32Call Proc(x,y)OeBug.Print x;yEnd SuBPuBlic SuB Proc(n As Integer,Byval m As Integer)n=n Mod 10m=m Mod 10End SuB打开窗体运行后,单击命令按钮,立即窗口上输出的结果是A.2 32B.12 3C.2 2D.12 32

考题 单击命令按钮,下列程序的执行结果为 Private Sub Commandl_Click() Dim x As Integer,y As Integer x=32:y=42 Call PCS(x,y) Print x;y End Sub Public Sub PCS(Byval n As Integer,ByVal m As Integer) n=n Mod 10+1 m=m Mood 10+1 End SubA.32 42B.2 32C.2 3D.12 3

考题 在窗体上画一个命令按钮,然后编写如下程序:Sub S1(ByVal x As Integer, By Val y As Integer) Dim t As Integer t=x x=y y=tEnd SubPrivate Sub Command1_ Click() Dim a As Integer, b As Integer a=10 b=30 S1 a,b Print "a=";a="b=";bEnd Sub 程序运行后,单击命令按钮,输出结果是______。A.a=30 b=10B.a=30 b=30C.a=10 b=30D.a=10 b=10

考题 有如下程序: Private Sub Commandl_Click() Dim a As Single Dim b As Single a=2:b=4 Call CS(a,b)End Sub Sub CS(x As Single,y As Single) t=X x=t\y y=t Mod y End Sub 程序运行后,单击命令按钮,a和b的值分别为A.0 0B.1 1C.0 2D.1 2

考题 阅读下列程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击一次窗体,再单击命令按钮,将显示一个输入对话框,如果在对话框中输入20,则程序的输出结果为A.0B.20C.40D.无任何输出

考题 单击命令按钮时,下列程序的执行结果是Private Sub Commandl_Click()Dim a As Integer,b As Integer,c As Integera=3:b=4:c=5Print SecProc(c,b,A)End SubFunction FirProc(x As Integer,y As Integer,z As Integer)FirProc=2*x+y+3*zEnd FunctionFunction SecProc(x As Integer,y As Integer,z As Integer)SecProc=FirProc(z,x,y) +xEnd FunctionA.20B.22C.28D.30

考题 在窗体上有一个命令按钮Commandl,编写事件代码如下:Private Sub Commandl Click( ) Dim X As Integer,Y As Integer x=12:y=32 Call Proc(x,Y) Debug.Print X;Y End Sub Public Sub proc(n As Integer,ByVal in As Integer) n=n Mod 10 m=m Mod 1O End Sub 打开窗体运行后,单击命令按钮,立即窗口上输出的结果是( )。A.232B.123C.22D.1232

考题 在窗体上画一个名称为Commana1的命令按钮,然后编写如下程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func = Y End Function Private Sub Form. MouseDown(Button As Integer,_ Shift As Integer,X As Single, Y As Single) SW = False End Sub Private Sub Form_MouseUp( Button As Integer,_ Shift As Integer ,X As Single, Y As Single) SW = True End Sub Private Sub Commandl_Click( ) Dim intNum As Integer intNum = InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为A.输出0B.输出25C.输出45D.无任何输出

考题 以下程序运行时,单击窗体后,在窗体上输出的结果是 ______。 Private SubForm_Click() Dim a As Integer,b As Integer a=10 :b=20 Call ff(a,B)Print a,b End Sub Private Sub ff(x As Integer,y As Integer) x=x+y y=x+y End SubA.30 50B.30 30C.20 20D.10 20

考题 单击命令按钮时,下列程序代码的执行结果为 Public Sub Procl(n As Integer,ByVal m As integer) n=n Mod 10 m=m\10 End sub Private Sub Commandl_Click() Dim x AS Integer,y AS Integer x=12:y=24 Call Procl(x,y) Print x;y End subA.12 24B.2 24C.2 3D.12 2

考题 单击命令按钮执行下列程序,其输出结果是( )。 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3 b=4 c=5 Print SecProc(c,b,A)End Sub Function FirProc(x As Integer, y As Integer, z As Integer) FirProc=2*x+y+3*Z End Function Function SecProc(x As Integer,y As Integer, z As Integer) SecProc=FirProc(z,x,y)+x End FunctionA.20B.22C.28D.30

考题 阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click() Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.A.16B.21C.26D.31

考题 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x > 20x 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x 20x = x + 10y = y + xIf x 20 Then Exit DoLoopPrint x, yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.10 20B.30 60C.10 30D.20 60

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

考题 以下程序运行后,单击按钮输出结果是 Private Sub Commandl_Click( ) Dim x As Integer,y As Integer,z As Integer X=4:y=2: Z=3 Call Gopd(x,x,z) Print x;X;Z Call Gopd(x,y,y) Print x;y;y End Sub Private Sub Gopd(x As Integer,y As Integer,z As Integer) X=3 * Z + 1 y=2 * z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10

考题 在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为,( )。 Private Sub fun(ByVal x As Integer,ByVal y As Integer,Byval z As Integer) z=x^3*y^3 End Sub Private Sub Command1_Click() Dim m As Integer Call fun(2,3,m) Print m End SubA.216B.0C.35D.程序不能运行

考题 在窗体上画一个名称为Coramandl的命令按钮,然后编写如下程序; Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim a As Boolean SW=False End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox("") If SW Then Print flmc(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为A.输出0B.输出2C.输出45D.无任何输出

考题 单击按钮时,以下列程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=X+y End Sub Private Sub Command1_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call proc1(x,x,2) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 6 6 10B.9 5 10 5 10 10C.9 6 12 9 10 15D.9 5 10 5 4 10

考题 在窗体上画一个命令按钮,然后编写如下程序 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