帮忙修改一个程序
//输入两个正整数m和n,求其最大公约数using std::cout;
using std::cin;
using std::endl;
int main()
{
int a,b,x,y;
cout<<endl;
cin>>a>>b;
if(a>b)
{
x=a;
y=b;
}
else
{
x=b;
y=a;
}
if(x%y!=0)
{
while(x%y!=0)
{
x=x%y;
y=y%x;
}
if(x=0)
cout<<y;
if(y=0)
cout<<x;
}
else
cout<<y;
return 0;
}