F.unction fun(a As Integer,b As Integer)
D.im c As Integer
If a<b Then
c=a:a=b:b=c
E.nd If
c=0
D.o
c=c+a
Loop Until c Mod b=0
fun=c
E.nd function
若调用函数 fun 时的实际参数都是自然数,则函数返回的是
A. ) a 、 b 的最大公约数
B. ) a 、 b 的最小公倍数
C. ) a 除以 b 的余数
D. ) a 除以 b 的商的整数部分
[单选题]设有以下函数过程:F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thenc=a:a=b:b=CE.nd IFc=0D.oc=c+aLoop Until c Mod b=0fun=cE.nd Function若调用函数fun时的实际参数都是自然数,则函数返回的是( )。A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分
[单选题]设有以下函数过程:F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thene=a:a=b:b=cE.nd Ifc=0D.oc=C+aroop Until c Mod b=0fun=cE.nd Function若调用函数fun时的实际参数都是自然数,则函数返回的是A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分
[单选题]设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerE.hd Function若已有变量声明:D.im x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是A.x(0)=Fun(x,“ch”)B.n=Fun(n,ch)C.Call Fun x,“ch”D.n=Fun(x(5),ch)
[单选题](23)设有以下函数过程Private Function Fun(a() As Integer, b As String) As Integer...E.nd Function若已有变量声明:D.im x(5)As Integer, n As Integer, ch As String则下面正确的过程调用语句是A.)x(o)=Fun(x, "ch")B.)n=Fun(n, chC.)Call Fun x, "ch"D.)n=Fun(x(5), ch)
[单选题]有如下函数过程: 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) Prin
[单选题]设有以下函数过程:Function fun (a As Integer,b As integer)Dim c As IntegerIf a
[单选题]有下列函数过程:F.unction fun1(ByVal x As Integer,ByVal y As Integer)As IntegerD.o While y<>0reminder=x Mod yx=yy=reminderLoopfun1=xE.nd Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。Private Sub Command1_Click()D.im a As IntegerD.im b As Integera=100b=25x=fun1(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
[单选题]有如下一个函数过程:F.unction Fun(a As Integer)Static cb=0:b=b+1:c=c+1F.un=a+b+cE.nd Function在窗体上添加一个命令按钮,事件过程如下:Private Sub Command1_Click()D.im a As Integera=2F.or i=1 To 3Print Fun(a);NextE.nd Sub运行该程序,单击命令按钮,输出结果是A.4 4 4B.4 5 6C.6 7 8D.4 7 9
[单选题]有如下一个函数过程: Function Fun(a As Integer) Static C b=0:b=b+1:c=c+1 Fun=a+b+c End Function 在窗体上添加一个命令按钮,事件过程如下: Private Sub Command1_Click() Dim a As Integer a=2 For i=1 To 3 Print Fun(a); Next End Sub 运行该程序,单击命令按钮,输出结果是A.4 4 4B.4 5 6C.6 7 8D.4 7 9