#include
int main()
{ int a,b,i,c,d,m,n;
scanf("%d %d",&m,&n);
for(i=m;i>=1;i--)
{a=m%i;
b=n%i;
if(a==0&&b==0)
{printf("the greatest common divisor is %dn",i);break;}
else
continue;}
c=m/i*n;
printf("the least common multiple is %dn",c);
return 0;}
=1;i--" property="og:description"/>
#include
int main()
{ int a,b,i,c,d,m,n;
scanf("%d %d",&m,&n);
for(i=m;i>=1;i--)
{a=m%i;
b=n%i;
if(a==0&&b==0)
{printf("the greatest common divisor is %dn",i);break;}
else
continue;}
c=m/i*n;
printf("the least common multiple is %dn",c);
return 0;}