设有以下函数过程:Function fun(a As Integer,b As Integer)Dim c As IntegerIf a<b Thene=a:a=b:b=cEnd Ifc=0Doc=C+aroop Until c Mod b=0fun=cEnd Function若调用函数fun时的实际参数都是自然数,则函数返回的是A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分

题目

设有以下函数过程:

Function fun(a As Integer,b As Integer)

Dim c As Integer

If a<b Then

e=a:a=b:b=c

End If

c=0

Do

c=C+a

roop Until c Mod b=0

fun=c

End Function

若调用函数fun时的实际参数都是自然数,则函数返回的是

A.a、b的最大公约数

B.a、b的最小公倍数

C.a除以b的余数

D.a除以b的商的整数部分


相似考题
更多“设有以下函数过程:Function fun(a As Integer,b As Integer)Dim c As IntegerIf a&lt;b Thene=a: ”相关问题
  • 第1题:

    以下所列的各函数首部中,正确的是______。

    A.void play(var:Integer,var b:Integer)

    B.void play(int a,b)

    C.void play(int a,int b)

    D.Sub play(a as integer,b as integer)


    正确答案:C

  • 第2题:

    以下所列的各函数首部中,正确的是:()

    A.void play(var :Integer,var b:Integer)

    B.void play(int a,b)

    C.void play(int a,int b)

    D.Sub play(a as integer,b as integer)


    void play ( int a,int b )

  • 第3题:

    以下所列的各函数首部中,正确的是()。

    A.void play(int a,b)

    B.void play(var :Integer,var b:Integer)

    C.void play(int a,int b)

    D.Sub play(a as integer,b as integer)


    void play ( int a,int b )

  • 第4题:

    以下哪个函数声明是正确的?

    A.void play(int a, int b);

    B.void play(a:Integer, b:Integer);

    C.void play(int a, b) ;

    D.Sub play(a as integer, b as integer);


    void play(int a, int b) ;

  • 第5题:

    以下所列的各函数首部中,正确的是

    A.void play(var :Integer,var b:Integer)

    B.void play(int a,b)

    C.void play(int a,int b)

    D.Sub play(a as integer,b as integer)


    C

  • 第6题:

    以下所列的各函数首部中,正确的是________。

    A.void play(var a:Integer,var b:Integer)

    B.void play(int a,b)

    C.void play(int a,int b)

    D.void play(a as integer,b as integer)


    void play ( int a,int b )