程序填空题:Euclid's GCD
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
```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