精英家教网 > 高中数学 > 题目详情

以下是用Scilab编写的程序,输出ab的含义是________________

a=input(please give the first number)

b=input(please give the second number)

while a<>b

   if a=b

    a=ab

   else

    b=ba

  end

end

print(io(2)ab)

答案:略
解析:

求a,b的最大公约数


练习册系列答案
相关习题

科目:高中数学 来源:“伴你学”新课程 数学·必修3、4(人教B版) 人教B版 题型:044

以下是用Scilab语句编写的一个程序,根据程序画出相应的程序框图.

x=input(“x=”);

y=input(“y=”);

print(%io(2),x/2)

print(%io(2),3*y)

x=x+1;

y=y+1;

print(%io(2),x)

print(%io(2),y)

查看答案和解析>>

科目:高中数学 来源:数学教研室 题型:022

以下是用Scilab编写的程序,输出a,b的含义是________________.

a=input(“please give the first number”)

b=input(“please give the second number”)

while a<>b

   if a>=b

    a=a-b;

   else

    b=b-a;

  end

end

print(%io(2),a,b)

查看答案和解析>>

同步练习册答案