#include<stdio.h>
int main()
{
int m,n,a,b,t,temp,h;
scanf("%d%d",&m,&n);
a=m;
b=n;
if(a<b)
{
t=a;
a=b;
b=t;
}
while(b!=0)
{
temp=a%b;
a=b;
b=temp;
}
h=m*n/a;
printf("the greatest commom divisor:%d\n",a);
printf("the minimum common multiple:%d\n",h);
return 0;
}
网友评论