有如下函数过程:Function Fun(By Val x As Ingeger, ByVal y As Integer)As IntegerDo While … y 0reminder=x Mod yx=yy=reminderLoopFun=xEnd Function以下是调用该函数的事件过程,该程序的运行结果是Private Sub Command1Dim a As IntegerDim b As Integera=100:b=25x=Fun(a,b)Print xEnd 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

Dim a As Integer

Dim b As Integer

a=100:b=25

x=Fun(a,b)

Print x

End Sub

A.0

B.25

C.50

D.100


相关考题:

program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为(). A567 563B567 567C567 167D567 163

如果Add函数的调用代码为:func main() {var a Integer = 1var b Integer = 2var i interface{} = asum := i.(Integer).Add(b)fmt.Println(sum)}则Add函数定义正确的是() A.type Integer intfunc (a Integer) Add(b Integer) Integer { return a + b}B.type Integer intfunc (a Integer) Add(b *Integer) Integer { return a + *b}C.type Integer intfunc (a *Integer) Add(b Integer) Integer { return *a + b}D.type Integer intfunc (a *Integer) Add(b *Integer) Integer { return *a + *b}

有下列函数定义: int fun(double a,double b) {return a*b;} 若下列选项中所用变量都已经正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(X,y)x,y);D.fun(x,y);

有下列函数定义: int fun(double a,double B) {return a*b;} 若下列选项中所用变量都已正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(x,y)x,y);D.fun(x,y);

有下列函数定义:int fun(double a,double B){return a*b;}若下列选项中所用变量都已正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(x,y)x,y);D.fun(x,y);

有下列函数定义: int fun(double a,double b) {return a*b;} 若下列选项中所用变量都已正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(x,y)x,y);D.fun(x,y);

有以下函数定义: int fun(double a,doubleB){return a*b;} 若以下选项中所用变量都已正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(x,y)x,y);D.fun(x,y);

链表的定位函数loc(I:integer):pointer; {寻找链表中的第I个结点的指针}procedure loc(L:linklist; I:integer):pointer;var p:pointer;j:integer;

有下列函数定义:int fun(double a,double b) {return a*b;} 若下列选项中所用变量都己正确定义并赋值,错误的函数调用是( )。A.if(fun(x,y)){……}B.z=fun(fun(x,y),fun(x,y));C.z=fun(fun(x,y)x,y);D.fun(x,y);

11、下面哪些定义是类型正确的?A.f :: (Integer, Integer) - Float f (x,y) = x / yB.f :: (Integer, Integer) - Float f (x,y) = (fromInteger x) / (fromInteger y)C.f :: (Integer, Integer) - Float f (x,y) = 3*x + yD.f :: (Integer, Integer) - Integer f (x, y) = 3*x + y