下面是求最大公约数的函数的首部: Function gcd(ByVal X As Integer,ByVal y As Integer)As Integer 若要输出8、12、16这3个数的最大公约数,下面正确的语句是( )。A.Print gcd(8,12),gcd(12,16),gcd(16,8)B.Print gcd(8,12,16)C.Print gcd(8),gcd(12),gcd(16)D.Print gcd(8,gcd(12,16))

题目

下面是求最大公约数的函数的首部: Function gcd(ByVal X As Integer,ByVal y As Integer)As Integer 若要输出8、12、16这3个数的最大公约数,下面正确的语句是( )。

A.Print gcd(8,12),gcd(12,16),gcd(16,8)

B.Print gcd(8,12,16)

C.Print gcd(8),gcd(12),gcd(16)

D.Print gcd(8,gcd(12,16))


相似考题
更多“下面是求最大公约数的函数的首部: Function gcd(ByVal X As Integer,ByVal y As Integer)As In ”相关问题
  • 第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题:

    11、下面哪些定义是类型正确的?

    A.f :: (Integer, Integer) -> Float f (x,y) = x / y

    B.f :: (Integer, Integer) -> Float f (x,y) = (fromInteger x) / (fromInteger y)

    C.f :: (Integer, Integer) -> Float f (x,y) = 3*x + y

    D.f :: (Integer, Integer) -> Integer f (x, y) = 3*x + y


    AFT 通常由含有一个双氢呋喃环和一个氧杂萘邻酮(香豆素)的基本架构单位构成 AFT 分为 黄曲霉毒素B1(AFB1)、黄曲霉毒素 B2 (AFB2) 黄曲霉毒素G1(AFG1)、黄曲霉毒素 G2(AFG2) 黄曲霉毒素M1(AFM1)、黄曲霉毒素 M2(AFM2) B1、G1的呋喃环氢键异构。M1型氢键变为羟基。 1比2呋喃环上多了一个双键。

  • 第4题:

    求两数的最大公约数

    function gcd(a,b:integer):integer;


    正确答案:

     

    begin
    if b=0 then gcd:=a
    else gcd:=gcd (b,a mod b);
    end ;

  • 第5题:

    下面是求最大公约数的函数的首部 Function gcd(ByVal x As Integer, ByVal y As Integer) As Integer 若要输出8、12、16这3个数的最大公约数,下面正确的语句是__________。

    A.Print gcd(8,12),gcd(12,16),gcd(16,8)

    B.Print gcd(8,12,16)

    C.Print gcd(8),gcd(12),gcd(16)

    D.Print gcd(8,gcd(12,16))


    迭代算法