下面程序的功能是用辗转相除法求两个正整数m和n的最大公约数。
hcf(intm,intn)
{intr;
if(m{r=m;
①;
n=r;
}
r=m%n;
while(②)
{m=n;
③;
正确答案:①m=n②r!=0③return(n)
相关答案
热门答案