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

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

(33)有如下事件程序,运行该程序后输出结果是

Private Sub Command33_Click()

Dim x As Integer,y As Integer

x=1:y=0

Do Until y<=25

y=y+x*x

x=x+1

Loop

MsgBox "x="&x&",y="&y

End Sub

A)x=1,y=0

B) x=4,y=25

C)x=5,y=30

D)输出其他结果


参考答案

更多 “ (33)有如下事件程序,运行该程序后输出结果是Private Sub Command33_Click()Dim x As Integer,y As Integerx=1:y=0Do Until y=25y=y+x*xx=x+1LoopMsgBox "x="x",y="yEnd SubA)x=1,y=0B) x=4,y=25C)x=5,y=30D)输出其他结果 ” 相关考题
考题 在窗体上画一个命令按钮,然后编写如下程序: 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 Sub Command33_Click()Dim X As Integer,y As Integerx=1:Y=0Do Until y=25y=y+X*XX=X+1 ‘Loop ’ 。MsgBox“x一”&X&,“y=”&yEnd SubA.x=1,y=0B.x=4,y=25C.x=5,y=30D.输出其他结果

考题 设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

考题 有如下函数过程: Function fun1(ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a AS Integer Dim b As Integer a=100 b=25 x=fun1(a,B) Print x End SubA.0B.25C.50D.100

考题 设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35

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

考题 设有如下程序: 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

考题 有如下程序: 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 * ##

考题 有以下函数过程: Function Gys (ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 Reminder = x Mod y x = y y= Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a = 50 b = 10 x=Gys (a,B)Print x End SubA.0B.10C.50D.100

考题 有如下函数过程: Function funl(ByVal x As Integer,ByVal y As Integer)As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100 b=25 x=funl(a,B)Print x End SubA.0B.25C.50D.100

考题 有如下函数过程。Function UNC(ByVal x As Integer,ByVal y As Integer)As IntegerDo While y<>0S=x/yx=yy=SLoopUNC=xEnd Function以下事件调用该函数,程序运行结果是【 】。Private Sub Command1_Click()Dim a As IntegerDim b As Integera=12b=2x=UNC(a,b)Print xEnd Sub

考题 有如下事件程序,运行该程序后输出结果是( )。 PrivateSub Command33_click Dim x AsInteger,Y AsInteger x=1:y=0 Do Untily=25y=y+x*xx=x+1 Loop MsgBox”x=&x&”,y="Y End SubA.x=1,y=0B.x=4,y=25C.x=5,y=30D.输出其他结果

考题 有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) 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 * # 1 1 * #B.1 1 * # 1 2 * #C.1 1 * # 1 1 * ##D.1 1 * # 1 2 * ##

考题 有如下事件过程: Function UNC (ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 sic=x/y x=y y=sic Loop UNC=x End Function 以下是该函数的调用过程,该程序的运行结果是 PriVate Sub COmmand1_Click() Dim a As Integer Dim b As Integer a=12 b=2 x=UNC (a,B)Print x End SubA.0B.6C.2D.80

考题 在窗体上画一个名称为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

考题 有如下函数过程。 Function Fun( By Val x As Integer,By Val y As Integer) As Integer Do While y <> 0 reminder = x Mod y xmy y = reminder Loop Fun = x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub CommandT_Click( ) Dim a As Integer,b As Integer a = 100:b =25 x =Fun(a,B)Print x End SubA.0B.25C.50D.100

考题 有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。A.1B.3C.16D.9

考题 阅读下面的程序; 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

考题 有如下函数过程: Function Fun (By Val x As Ingeger, ByVal y As Integer)As Integer Do While…y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100:b=25 x=Fun(a,b)Print x End SubA.0B.25C.50D.100

考题 有以下函数过程: Function Gys(ByVal x As Integer,ByVal y As Integer)As Integer Do While y< 0 Remender=x Mod v x=y Y=Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click( ) Dim a As Integer Dim b As Integer a=50 b=10 x=Cys(a,B)Print x End subA.0B.10C.50D.100

考题 运行下列程序: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 Form. Click( ) Dim i As Integer,x As String,y As String x=ABCDEFGFor i=4 To 1Step-1y=Mid(X,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

考题 在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为,( )。 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 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