利用辗转相除求两个数的最大公约数
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a=1,b=1,tmp=1;
scanf("%d %d\n",&a,&b);
while(tmp=a%b)
{
a=b;
b=tmp;
}
printf("%d\n",b);
system("pause");
return 0;
}