单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,18) End Sub Public Function MyFunc(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 My Func=m End FunctionA.2B.4C.6D.8

单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,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 My Func=m End Function

A.2

B.4

C.6

D.8


相关考题:

单击命令按钮,下列程序的执行结果是Private Sub Blck(x As Integer)x=x * 2 + 1If x 6 ThenCall Blck(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command1_Click()Blck 2End Sub( )。A.23 47B.10 36C.22 44D.24 50

单击命令按钮时,下列程序的执行结果是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

单击命令按钮时,下列的执行结果为Private Sub Command1_Click()Dim x As Integer, y As Integerx=86: y=29Call Proc(x, y)Print x; yEnd SubPublic Sub Proc(n As Integer, ByVal m As Integer)n=n Mod 10m=m Mod 10End Sub( )。A.12 32B.6 29C.2 3D.12 3

单击命令按钮时,下列程序的执行结果为Private Sub Command1_Click()Dim x As Integer, y As Integerx=12: y=32Call PCS(x, y)Print x; yEnd SubPublic Sub PCS(ByVal n As Integer, ByVal m As Integer)n=n Mod 10m=m Mod 10End Sub( )。A.12 32B.2 32C.2 3D.12 3

单击命令按钮时,下列程序代码的执行结果为 ______。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m/10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12: y=34 Call Procl(x,y) Print x;y End SubA.12 34B.2 34C.2 3D.12 3

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() A="12" B="34" C="56" Print A+B+C End Sub 程序运行后,单击命令按钮,输出结果是( )。A."123456"B.123456C.102D.显示出错信息

单击命令按钮时,下列程序的执行结果是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

单击命令按钮时,下列程序代码的执行结果为______。 Private Sub Proe1 (n As Integer,ByVa1 m As Integer) n=n Mod 10 m=m\ 10 End Sub Private Sub Command1_Click() Dim x As Integer Dim y As Integer x= 12 y = 34 Call Proe1 (x, y) Print x; y End SubA. 12 34B.2 34C.2 3D.12 3

窗体上命令按钮Commandl的事件过程如下:Private Sub Command1_Click()Dim total As Integertotal=s(1)+s(2)Print totalEnd SubPrivate Function s(m As Integer)As IntegerStatic x As IntegerFor i=1 To mx=x+1Next is=xEnd Function运行程序,第3次单击命令按钮Command1时,输出结果为【 】。

窗体上有一个命令按钮,命令按钮的单击事件过程如下: 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

单击命令按钮之后,下列程序代码的执行结果为______。 Private Function P(N As Integer) Static sum For I=I To N Sum = sum +1 Next I P =sum End Function Private Sub Command1_Click() S=P(1)+P(2)+P(3)+P(4) Print S: End SubA.20B.30C.115D.135

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

单击命令按钮时,下列程序代码的运行结果为 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 Whle m<n:n=n-m:Loop Loop MyFunc=m End FunctionA.0B.2C.4D.6

单击命令按钮时,下列程序代码的执行结果为_________。 Public Sub Procl(n As Integer,By Val m As Integer) n=n Mod i() m=m/10 End Sub Private Sub Command1 CliCk() Dim x As Integer,y As Integer x=12:y=34 Call Procl(x,y) Print x;y End SubA.12 34B.2 34C.2 3D.12 3

单击命令按钮时,下列程序的执行结果是 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() a = fun(4) + fun(5) Print a; End Sub Public Function fun (n As Integer) Static Num For i = 1 To n Num = Num + i Next i fun = Num End FunctionA.15B.20C.35D.40

单击一次命令按钮之后,下列程序代码的执行结果为 private Sub Command1_Click() S=P(1) +P(1)+P(2)+P(3)+P(4) Print S: End Sub Public Function P(N As Integer) Static Sum For I=1 To n Sum=Sum+I Next 1 P=Sum End FunctionA.20B.35C.115D.135

单击命令按钮时,下列程序的执行结果为 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

单击命令按钮时,下列程序代码的执行结果为 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

单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(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=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End SubA. 2B.4C.6D.8

单击命令按钮时,下列程序代码的执行结果为______。 Private Function PickMid(xStr As String) As String Dim tempStr As String Dim strLen As Integer tempStr=“” strLen=Len(xStr) i=1 Do While i<=strLen/2 tempStr=tempStr+Mid(xStr,i,1)+Hid(xStr,strLen-i+1,1) i=i + 1 Loop PickMid=tempStr End Function Private Sub Command1_Click() Dim FirstStr As String FirstStr=“abcdef” Print PickMid(FirstStr) End SubA.abcdefB.afbecdC.fedcbaD.defabc

在窗体上画一个命令按钮,其名称为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 Function FirProc (x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Function Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Function Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim C As Integer a=2 b = 3 c = 4 Print SecProc(c,b,A) End SubA. 21B.19C.17D.34

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

单击命令按钮时,下列程序的执行结果是 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.出错