-->
当前位置:首页 > 题库 > 正文内容

程序填空题:Euclid's GCD

Luz4年前 (2021-05-10)题库1081
Your program reads two integers and prints the greatest common divisor.

```c
#include
int main()
{
int a, b;
scanf("%d %d", &a, &b);
while ( @@[b](2) ) {
int r = @@[a%b](2);
@@[a = b](2);
@@[b = r](2);
}
printf("%d\n", @@[a](2));
}
```






答案:
第1空:b

第2空:a%b

第3空:a = b

第4空:b = r

第5空:a

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。