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

题目

( 25 )设有以下函数过程

Function fun(a As Integer,b As Integer)

Dim c As Integer

If a<b Then

c=a:a=b:b=c

End If

c=0

Do

c=c+a

Loop Until c Mod b=0

fun=c

End function

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

A ) a 、 b 的最大公约数

B ) a 、 b 的最小公倍数

C ) a 除以 b 的余数

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


相似考题
更多“( 25 )设有以下函数过程Function fun(a As Integer,b As Integer)Dim c As IntegerIf a&lt;b The ”相关问题
  • 第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题:

    要将整数25转换为二进制形式的数字串,可以用哪些方法?

    A.Integer.toBinaryString(25)

    B.Integer.toString(25,2)

    C.Integer.toString(25)

    D.Integer.parseInt("25",2)


    30