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

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

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

A.0

B.25

C.5O

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.5OD.100 ” 相关考题
考题 ( 27 )要想在过程 Proc 调用后返回形参 x 和 Y 的变化结果,下列定义语句中正确的是A ) Sub Proc ( x as Integer,y as Integer )B ) Sub Proc ( ByVal x as Integer, y as Integer )C ) Sub Proc ( x as Integer,Byval y as Integer )D ) Sub Proc ( Byval x as Integer, Byval y as Integer )

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

考题 有如下函数过程:Function HFC(ByVal x As Integer, ByVal y As Integer) As IntegerDo While y 0sic=x / yx=yy=sicLoopHFC=xEnd Function以下是该函数的调用过程,该程序的运行结果是Private Sub Command1_Click()Dim a As IntegerDim b As Integera=12b=2x=HFC(a, B.Print xEnd Sub( )。A.0B.6C.2D.80

考题 下列函数过程的作用是计算x和y的最大公约数。请填空。Private Sub Command1_ Click()Dim x As Integer, y As Integer, Result As Integerx = InputBox (“请输入第一个数”)y = InputBox (“请输入第二个数”)Result =______Print x; "和"; y; "的最大公约数为: "; ResultEnd SubPrivate Function GYS (ByVal A As Integer, ByVal B As Integer)Dim T As IntegerT = A Mod BDo While ______A = BB = TT = A Mod BLoop______End Function

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub subl(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x*x+y*y End Sub Private Sub Command1_Click() Dim a As Integer a=8 Call subl(1, 2,a) Print a End Sub 程序运行后,单击命令按钮,则窗体下显示的内容是______。A.8B.2C.5D.11

考题 (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

考题 以下过程的定义中,( )是错误的。 A、Public Sub Sum(x ; y)B、Public Sub Sum(ByVal x, ByVal y)C、Public Sub Sum(x As Integer,y As Integer)D、Public Sub Sum(x%, y%)

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

考题 数组A在子过程或函数中定义为形参,正确的语句是( )。 A、Private Sub sele(ByVal A( ) As integer)B、Private Function sale(A() As Integer) As StringC、Private Sub sale(A() As Integer) As IntegerD、Private Sub sale(A(i) As Integer)

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

考题 单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, z As Integer x = 1: y = 2: z = 3 Call fun1 (x, y, z) Print x; y; z Call fun2(x, y, z) Print x; y; z End Sub Private Sub fun1(x As Integer, y As Integer, z As Integer) x = 10 * z y=z*z+ x z=x+ y+ z End Sub Private Sub fun2 (ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) x=10*z y=z*z+ x z=x+ y +z End SubA.1 2 3 30 39 72B.1 2 3 1 2 3C.30 39 72 1 2 3D.30 39 72 30 39 72

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

考题 有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(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

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

考题 设有如下程序:Prirate Sub Form_Click()Dim a As Integer,b AS Integera=20:b=50p1 a,bp2 a,bp3 a,bPrint"a=";a,"b=";bEnd SubSub p1(x As Integeh By Val y As Integer)x=x+10y=y+20End SubSub p2(ByVal x As Integer,y As Integer)x=x+10y=y+20End SubSub p3 (ByVal x As Integer,ByVal y As Integer)x=x+10y=y+20End Sub该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。

考题 有下列函数过程: 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 aA.0B.25C.50D.100

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

考题 要想在过程Proc调用后返回形参x和Y的变化结果,下列定义语句中正确的是( )。【考点5过程调用与参数传递】A.Sub Proc(x as Integer,Y as Integer)B.Sub Proc(ByVal x as Integer,Y as Integer)C.Sub Proc(x as Integer,ByVal Y as Integer)D.Sub Proc(ByVal x as Integer,ByVal Y as Integer)

考题 有如下函数过程: 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 Command7_Click() Dim s As Integer Dim b As Integer a=100 b=25 x=gys(a,B)Print x End SubA. 0B.25C.50D.100

考题 有如下函数过程: 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 funl(ByVal x As Integer, ByVal y As Integer) Do While y 0 Reminder=x Mody x=y y=reminder Loop Funl=xEnnd Function在下列按钮单击事件中调用该函数,则该程序的运行结果是 Privatr Sub Commandl_Click() Dim a As IntegerDim b As Integer a=100 b=25 x=funl(a,b) Print x End SubA.0B.25C.50D.100

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

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

考题 有如下函数过程: Function fun1(By Val x As Integer,By Val 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