这个for还是用while吧,看着那两个;怪怪的
#include<stdio.h>
int main(void)
{
int m, n, a, t, x, y;
printf("Enter two integers:");
scanf("%d%d",&m, &n);
x=n, y=m;
if(m<n)
{
t=m;
m=n;
n=t;
}
while(a!=0)
{
a=m%n;
m=n;
n=a;
}
printf("Greatest common divisor: %d %d\n", m, x*y/m );
return 0;
}