网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click( ) Print MyBM(23,18)End SubPublic Function MyBM(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 MyBM=mEnd Function
A.0
B.1
C.3
D.5
参考答案
更多 “ 单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click( ) Print MyBM(23,18)End SubPublic Function MyBM(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 MyBM=mEnd FunctionA.0B.1C.3D.5 ” 相关考题
考题
( 35 )在窗体中添加一个名称为 Commandl 的命令按钮,然后编写如下事件代码:Private Sub Commandl Click ()MsgBox f ( 24,18 )End SubPublic Function f ( m As Integer,n As Integer ) As IntegerDo While mnDo While mnm=m-nLoopDo While mnn=n-mLoopLoopf=mEnd Function窗体打开运行后,单击命令按钮,则消息框的输出结果是A ) 2B ) 4C ) 6D ) 8
考题
单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click()Print Fun(23,18)End SubPublic Function Fun(m As Integer,n As Integer) As IntegerDO While m<>nDO While m>n:m=m-n:LoopDO While m<n:n=n-m:LoopLoopFun=mEnd FunctionA.0B.1C.3D.5
考题
单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click() Print Fun(23,18) End Sub Public Function Fun(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 Fun=m End FunctionA.0B.1C.3D.5
考题
(25)下列程序的运行结果是 。 Private Function myfun(m,n) Do While mn Do While mn:m=m-n:Loop Do While nm:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9,8) End SubA.2 B.1 C.4 D.3
考题
在窗体中添加—个名称为Command1的命令按钮,然后编写如下事件代码: Private Sub Command1_Click() MsgBox f(24,18) End Sub Public Function f(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 f=m End Function 窗体打开并运行后,单击命令按扭,则消息框的输出结果是______。A.2B.4C.6D.8
考题
有如下程序,该程序的执行结果为______。 Dim k As Integer n=5 m=1 k=1 Do While k <= n m=m*2 k=k+1 Loop Print mA.1B.5C.32D.40
考题
下列程序的运行结果是( )。 Private Function myfun(m,n) Do while mn Do While mn:m=m-n:Loop Do Wllile nm:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click( ) print myfun(9,8) End SubA.2B.1C.4D.3
考题
阅读下面的程序: Private Sub Form_Click() Dim m,n As Integer m=InputBox("请输入M的值") m=Val(m) m1=m n=InputBox("请输入N的值") n=Val(n) n1=n Do While n<>0 remin=m Mod n m=n n=remin Loop Print m1,n1,m End Sub 程序运行后,单击窗体,在对话框中分别输入16和24,则程序在窗体上的输出结果为A.16 24 4B.16 24 8C.24 16 6D.24 16 8
考题
下列程序的运行结果是 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
考题
单击命令按钮时,下列程序代码的运行结果为 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
考题
单击命令按钮时,下列程序代码的运行结果为 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
考题
单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub
考题
下面程序的运行结果是 ______ 。程序的功能是 _______ 。Public Function myfun(m,n)Do while m>nDo while m>n:m=m-n:LoopDo While n>m:n=n-m:LoopLoopMyfun=mEnd FunctionPrivate Sub Command1_Click()Print myfun(15,15)End Sub
考题
单击命令按钮时,下列程序的运行结果为 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
考题
单击命令按钮时,下列程序代码的执行结果为______ 。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 myfun(m,n) Do While m>n Do While m>n:m=m-n:Loop Do While n>m:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9,8) End SubA.2B.1C.4D.3
考题
下列程序的运行结果是( )。Private Function myfun(m,n)Do While mnDo While mn:m=m-n:LoopDo While nm:n=n-m:LoopLoopmy fun=mEnd FunctionPrivate Sub Command1_Click()Print myfun(9,8)End SubA.2B.1C.4D.3
考题
窗体上有一个名称为Command1的命令按钮,并有如下程序: Private Sub Command1Click( ) Dim m As Integer,n As Integer m=InputBox("输入第一个数") nzInputBox("输入第二个数") Do While mn Do While mn m= m-n Loop Do While nm n=n-m Loop Loop Print m End Sub 该程序的功能是( )。A.求数值m和n的最大公约数B.求数值m和n的最小公倍数C.求数值m和n中的较大数D.求数值m和n中的较小数
考题
单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click()Print Fun(23, 18)End SubPublic Function Fun(m As Integer, n As Integer) As IntegerDo While m nDo While m n: m=m - n: LoopDo While m n: n=n - m: LoopLoopFun=mEnd FunctionA.0B.1C.3D.5
考题
阅读下面的程序; 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
考题
在窗体中添加一个名称为Commandl的命令按钮,然后编写如下事件代码:Private Sub Commandl Click( ) MsgBox f(24,18)End Sub Public Function f(m As Integer,n As Integer)As"integerDo While mn Do While mn m=m-n Loop Do While mn n=n-m Loop Loop f=m End Function 窗体打开运行后,单击命令按钮,则消息框的输出结果是( )。A.2B.4C.6D.8
考题
单击命令按钮时,下列程序的运行结果为 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 Dim x As Integer, y As Integer x=12:y=32 Call Proc(x,y. Print x; y End Sub Public Sub Proc(n As Integer, ByVal m As Integer. n=n Mod 10 m=m Mod 10 End SubA.1232B.232C.23D.123
考题
单击命令按钮时,下列程序代码的执行结果为 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 MyBM(23, 18)End SubPublic Function MyBM(m As Integer, n As Integer) As IntegerDo While m nDo While m n: m=m - n: LoopDo While m n: n=n - m: LoopLoopMyBM=mEnd Function( )。A.0B.1C.3D.5
热门标签
最新试卷