#include<stdio.h>
main()
{
int lcm,gcd,a,b,prod;
clrscr();
printf("\nEnter two values\n");
scanf("%d%d",&a,&b);
prod=a*b;
while(a!=b)
{
if(a>b)
{
a=a-b;
}
else if(b>a)
{
b=b-a;
}
}
gcd=a;
lcm=prod/gcd;
printf("\nLCM= %d and GCD= %d",lcm,gcd);
getch();
}