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

题目内容 (请给出正确答案)
运行下列程序:Dim bPrivate Sub Form_Click( )a = 1: b = 1Call fun1(a)Print "X = &quo

运行下列程序:

Dim b

Private Sub Form_Click( )

a = 1: b = 1

Call fun1(a)

Print "X = "; a; ",Y = "; b

End Sub

Private Sub fun1(a)

b = 2 * a

a = 3 * b

End Sub

单击窗体后,则在窗体上显示的结果是( )。

A.X = 1,Y = 1

B.X = 2,Y = 6

C.X = 6,Y = 2

D.X = 6,Y = 1


参考答案

更多 “ 运行下列程序:Dim bPrivate Sub Form_Click( )a = 1: b = 1Call fun1(a)Print "X = X = ; a; ,Y = ; bEnd SubPrivate Sub fun1(a)b = 2 * aa = 3 * bEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.X = 1,Y = 1B.X = 2,Y = 6C.X = 6,Y = 2D.X = 6,Y = 1 ” 相关考题
考题 下面程序段的运行结果是【 】。Option Base 1Private Sub swap(a()As InteSer)For I=1 to 10\2t=a(i)a(i)=a(10-1+1)a(10-1+1)=tNext1End SubPrivate Sub Form_Click()Dim x(10)As IntegerFor I=1 to 10x(i)=I*2Next1Swap x()For1=1 to 10Print x (i)Next IEnd Sub

考题 设有如下程序:Private Sub Form_Click()Dim n As Integer, s As Integern = 8s = 0Dos = s + nn = n - 1Loop While n 0Print sEnd Sub以上程序的功能是______。程序运行后,单击窗体,输出结果为______。

考题 ( 28 )在窗体上画一个命令按钮(名称为 Command1 ) ,并编写如下代码:Functin Fun1(Byval a As Integer ,b As Integer) As IntegerDim t As Integert=a-bb=t+aFun1=t+bEnd FunctionPrivate Sub Command1_Click()Dim x As IntegerX=10Print Fun1(Fun1(x,(Fun1(x,x-1))),x-1)End Sub程序运行后,单击命令按钮,输出结果是A ) 10B ) 0C ) 11D ) 21

考题 下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Const a=6 Dim x (a) As Integer For I=1 to a x(i)=1^2 Next I Print x(i) End SubA.36B.25C.1D.出错信息

考题 (27)有下列函数过程( )。 Function fun1(By Val x As Integer,By Valy As Integer) As Integer Do While y0 reminder=x Mody x=y y=reminnder 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 Sub A.0 B.25 C.50 D.100

考题 有如下函数过程: 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

考题 下面程序段的运行结果是【 】。Option Base 1Private Sub Swap (a() As IntegFor I=1 to 10\2t=a(I)a(I)=a(10-I+1)a(10-I+1)=tNext IEnd SubPrivate Sub Form_Click()Dim x(10) As IntegerFor I=1 to 10x(I)=I*2Next ISwap x()For I=1 to 10Print x(I)Next IEnd Sub

考题 在窗体上画一个命令按钮(名称为Command1),并编写下列代码: Function Fun1(ByVa1 a As Integer,b As Integer)As Integer Dim t As Integer t=a-b b=t+a Fun1=t+b End Function Private Sub Command1Click( ) Dim X As Integer x=10 Print Fun1(Vun1(X,(Fun1(x,x-1))),x-1) End Sub 程序运行后,单击命令按钮,输出结果是( )。A.10B.0C.11D.21

考题 下列程序的运行结果为______。Private Sub Command1_ Click() Dim s As Long Dim x As Integer s = 0 for x = 99 To 1 step - 2 s=s+ x Next x Print sEnd SubA.100B.500C.2500D.5000

考题 在窗体上画一个名称为Command1命令按钮,然后编写如下事件过程: Private Function fun1(n As Integer)As Integer Dim k As Integer If n = 1 Then k = 1 Else k = 1 + fun1(n - 1)* 2 End If fun1 = k End Function Private Sub Command1_Click () Dim m As Integer, x As Integer x = 4 m = fun1 (x) Print m End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.4B.6C.9D.15

考题 下列程序的运行结果是 Private Sub Form_Click() Dim k As Integer n=5 m=1 k=1 Do m=m+2 k=k+1 Loop Until k>n Print m End SubA.1B.12C.11D.32

考题 在窗体上画—个命令按钮(名称为Command1),并编写如下代码:Function Fun1 (ByVala As Integer, b As Integer)As Integer Dim t As Integer t=a-b b=t+ a Fun 1=t+ bEnd FunctionPrivate Sub Command1_ Click() Dim x As Integer x=10 Print Fun1(Fun1 (x,(Fun1(x,x-1))),x-1)End Sub程序运行后,单击命令按钮,输出结果是 ______。A.10B.0C.11D.21

考题 执行下面程序,第一行输出结果是【 】,第二行输出结果是47。Option ExplicitPrivate Sub Form_Click( )Dim A As IntegerA=2Call Sub1 (A) End SubPrivate Sub1 (x As Integer)x=x*2+1If x<10 ThenCall Sub1 (x)End Ifx=x*2+1Print xEnd Sub

考题 假定有如下事件过程: Privte Sub Form_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是A.81 4B.56 3C.28 1D.243 5

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

考题 以下程序运行后输出的结果是 ______。 Option Base 1 Private Sub Form_Click() Dim A(20) For K=1 To 20 A(K)=K^2 Next K Print A(K) End SubA.20B.441C.400D.出错信息

考题 下面程序: Private Sub Form_Click() Dim x,y,z As Integer x=5 y=7 z=0 CallPI(x,y,z) Print Str(z) End Sub SubP1(By Val a As Integer, By Val b As Integer, c As Integer) C=a+b End Sub 运行后的输出结果为______。A.0B.12C.Str(z)D.显示错误信息

考题 下面程序: Private Sub Form_Click() Dim x,y,z As Integer x=5 y=7 z=0 Call P1(x,y,z) Print Str(z) End Sub Sub P1(ByVal a As Integer,ByVal b As Integer,c As Integer) c=a+b End Sub 运行后的输出结果为 ______。A.0B.12C.Sb(z)D.显示错误信息

考题 运行下列程序:Private Sub form_Click( )Dim sl As String, s2 As Strings1 = "12341234m = 0For i = 3 To 1 Step -1m = m + 1s2 = fun1(s1, m)Debug.Print s2;Next iEnd SubPrivate Function fun1(x, y) As Stringfun1 = Right(x, y)End Function单击窗体后,则在立即窗口内显示结果是( )。A.1234B.4321C.434234D.1111

考题 运行下列程序:Dim x, yPrivate Sub Form_Click( )x = 1: y = 1: z = 1fun1 (1)Print x; y; zEnd SubPrivate Sub fun1(a)x = a + x: y = a + x: z = a + yEnd Sub单击窗体后,则输出结果是( )。A.1 1 1B.2 3 1C.2 3 4D.2 2 1

考题 运行下列程序:Private Sub Form_Click( )a$ = 2b$ = 1Call abcd(a, b, c$, d$)Print c; dEnd SubPrivate Sub abcd(x$, y$, z$, s$)z = x + ys = x - yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.3 1B.1 3C.211D.显示出错信息

考题 运行下列程序:Private Sub form_Click( )x = 8: y = 2Call fun1((x), y)Print x, yEnd SubPrivate Sub fun1(x, y)s = xx = s / yy = s Mod yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.4 2B.8 2C.8 0D.2 4

考题 运行下列程序: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 a As Integera = 1For i = 1 To 5Call fun1(a)Next iPrint aEnd SubPrivate Sub fun1(x)y = 2Dox = x + yLoop Until x 10End Sub单击窗体后,则在窗体上显示的结果是( )。A.5B.1 2 3 4 5C.19D.7

考题 在窗体上画一个命令按钮(名称为Command1),并编写下列代码:Function Fun1(ByVa1 a As Integer,b As Integer)As IntegerDim t As Integert=a-bb=t+aFun1=t+bEnd FunctionPrivate Sub Command1Click( )Dim X As Integerx=10Print Fun1(Vun1(X,(Fun1(x,x-1))),x-1)End Sub程序运行后,单击命令按钮,输出结果是( )。A.10B.0C.11D.21

考题 有如下函数过程: 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.5OD.100

考题 以下是某个窗体的模块代码,请分析单击窗体后程序运行至"*"号位置时变量X、Y和Z的值分别是【 】。DIM X AS INTEGERDIM Y AS INTEGERPRIVATE SUB FORM_CLICK()DIM X AS INTEGERX=1Y=1CALL AA(Y+1)Z=BB(X)'* * * * * * *MSGBOX "X="X"/Y="Y"/Z="ZEND SUBPRIVATE SUB AA(BYVAL Z AS INTEGER)Y=Z+XZ=X+YEND SUBPRIVATE FUNCTION BB(BYREF Y AS INTEGERY=Y+1BB=X+YEND FUNCTION