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

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

单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click( ) Print MyFund(20,18) End Sub Public Function MyFund(m As Integer,n As Integer)As Integer Do While m◇n Do While m>n:m=m-n:Loop Do While m<n:n=n-m:Loop Loop MyFund=m End Function

A.0

B.2

C.4

D.6


参考答案

更多 “ 单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click( ) Print MyFund(20,18) End Sub Public Function MyFund(m As Integer,n As Integer)As Integer Do While m◇n Do While mn:m=m-n:Loop Do While m<n:n=n-m:Loop Loop MyFund=m End FunctionA.0B.2C.4D.6 ” 相关考题
考题 单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click()BT 4End SubPrivate Sub BT(x As Integer)x=x * 2 + 1If x 6 ThenCall BT(x)End Ifx=x * 2Print x;End Sub( )。A.15B.16C.17D.18

考题 工程中有两个窗体,名称分别为Form1、Form2,Fonn1为启动窗体,该窗体上有命令按钮 Command1。要求程序运行后单击该命令按钮时显示Form2,则按钮Click事件过程应该是 ______。A.Private Sub Command1_click() Foma2.Show End SubB.Private Sub Command1_Click() Form2.Visible End SubC.Private Sub Command1_Click() Load Form2 End SubD.Private Sub Command1_click() Form.Load EndSub

考题 在窗体上画一个命令按钮(名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() b=5 c=6 Print a=b+c End Sub 程序运行后,单击命令按钮,输出的结果是 ______。A.a=11B.a=b+cC.a=D.假

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a S="VisualBasic" Print String(3, a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是______。A.VVVB.VisC.sicD.11

考题 在窗体上画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 Command1_Click() A="12" B="34" C="56" Print A+B+C End Sub 程序运行后,单击命令按钮,输出结果是( )。A."123456"B.123456C.102D.显示出错信息

考题 阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext i End Sub Private Sub Command1_Click()Dim a (1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。

考题 单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click()BT 4End SubPrivate Sub BT(x As Integer)x=x*2+1If x<6 ThenCall BT(x)End Ifx=x*2Print x;End SubA.15B.16C.17D.18

考题 阅读下列程序: Function func(n As Integer)As Integer Sum = 0 For i = 1 To n Sum = Sum + (i + 1)* i Next i func = Sum End Function.Private Sub Command1_Click () Dim a As Integer a= 5 s = func (A)Print s End Sub 程序运行后,单击命令按钮,输出的结果为A.80B.60C.70D.15

考题 有下列程序: Option Base 0 Private Sub Command1_Click() Dim City As Variant x = Array("Visual","Basic","Microsoft","Programming") Print x(2) End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是A.MicrosonB.错误提示C.VisualD.Basic

考题 窗体上有一个命令按钮,命令按钮的单击事件过程如下: Private Sub Command1_Click() Dim a a=Array(1,2,3,4,5) For k=1 To 4 s=s+a(k) Next Print S End Sub 运行程序后,单击命令按钮,输出结果是A.10B.14C.15D.120

考题 在窗体上画一个命令按钮(名称为Command1),编写如下事件过程: Private Sub Command1_Click() b=5 c=6 Print a=b+c End Sub 程序运行后,单击命令按钮,输出的结果是: ______。A.a=11B.a=b+cC.a=D.假

考题 在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() x=-5 If Sgn(x) Then y=Sgn(x^2) Else y=Sgn(x) End If Print y End Sub 程序运行后,单击命令按钮,其输出结果为 ______。A.-5B.25C.-1D.1

考题 在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click( ) a=12345 Print Format $(a,"000.00") End Sub 程序运行后,单击命令按钮,窗体上显示的是A.123.45B.12345.00C.12345D.00123.45

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

考题 单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() BT 4 End Sub Private Sub BT(x As Integer) x=x*2+1 If x<6 Then Call BT(x) End If x=x*2 Print x; End SubA.15B.16C.17D.18

考题 单击命令按钮时,下列程序代码的运行结果为 Private Sub Command1_Click() print MyFunc(20,18) End Sub Public Function MyFunc (m As Integer,n As Integer)As Integer Do While m n Do While m > n:m=m - n:Loop Do While m < n:n=n - m:Loop Loop MyFunc=m End FunCtionA.0B.2C.4D.6

考题 在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a$="VisualBasic" Print String(3,a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.VVVB.VisC.sicD.11

考题 单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim x As Integer,y As Integer x=50:y=78 Call PPP(x,y) Print x;y End Sub Public Sub PPP(ByVal n As Integer,ByValm As Integer) n=n\10 m=m\10 End SubA.08B.50 78C.450D.78 50

考题 有如下程序: Private Sub Command1_Click() as="A WORKER IS HERE" x = Len(a$) For i=1 To x - 1 b$ =Mid$(a$, i,3) If b$ ="WOR" Then S=S+ 1 Next Print S End Sub 单击命令按钮,程序运行结果为A.1B.2C.3D.5

考题 在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a=0 Then x=x-1 Else If b<>0 Then End If End If If c<>0 Then x=3 Else x=4 End If Print x End Sub 程序运行后,单击命令按钮,其输出结果为 ______。A.34B.4C.35D.3

考题 单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click( ) Print Fun(23, 18) End Sub Public Function Fun(m As Integer, n As Integer) As Integer Do Whilem <> n Do While m > n : m--m - n: Loop Do While m < n : n=n - m: Loop Loop Fun =m End FunctionA.0B.1C.3D.5

考题 在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果为( )。 Private Sub p1(n As Integer) For i=n To 1 Step-1 x=String(i,"*") Print x Next i End Sub Private Sub Command1_Click() p1(3) End SubA.*** ** *B.* ** ***C.* * *D.******

考题 单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click() Print MyFund(20,18) End Sub Public Function MyFund(m As Integer,n As Integer)As Integer Do While m<>n Do While m>n:m=m-n:Loop Do While m<n:n=n-m:Loop Loop MyFund=m End FunctionA.0B.2C.4D.6

考题 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() For i=1 To 4 X=4 For j=1 To 2 X=x+6 Next Next Print x End Sub 程序运行后,单击命令按钮,输出结果是A.12B.13C.16D.17

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

考题 单击命令按钮时,下列程序的执行结果是 Private Sub Commandl_Click( ) BT 4 End Sub PriVate Sub BT(x As Integer) X=X * 2 + 1 If x <6 Then Call BT(x) End If X=x * 2 Print x; End SubA.15B.16C.17D.18

考题 在窗体上画一个命令按钮(名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() a=4:b=5:c:6 Print a=b+c End Sub 程序运行后,单击命令按钮,其结果为A.a=11B.a=b+cC.FalseD.出错