#include
int gongyue(int m,int n)
{
int r;
if(m==n) return m;
else
while((r=m%n)!=0)
{
m=n;
n=r;
}
return n;
}
int gongbei(int m,int n)
{
if(m==n) return m;
else return m*n/gongyue(m,n);
}
void main()
{
int a,b,i;
printf("please input two number:n");
scanf("%d%d",&a,&b);
i=gongyue(a,b);
printf("最大公约数是:%dn",gongyue(a,b));
printf("最小公倍数是:%dn",gongbei(a,b));
}