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

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

( 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 ab 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 的商的整数部分 ” 相关考题
考题 以下所列的各函数首部中,正确的是 ( )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)

考题 以下所列的各函数首部中,正确的是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)

考题 如果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}

考题 以下所列的各函数首部中,正确的是______。A.void play(var a: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)

考题 以下所列的各函数首部中,正确的是______。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)

考题 以下哪个函数声明是正确的?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);

考题 以下所列的各函数首部中,正确的是:()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)

考题 以下所列的各函数首部中,正确的是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)

考题 以下所列的各函数首部中,正确的是()。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)

考题 要将整数25转换为二进制形式的数字串,可以用哪些方法?A.Integer.toBinaryString(25)B.Integer.toString(25,2)C.Integer.toString(25)D.Integer.parseInt("25",2)