#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,i;
clrscr();
printf("Enter 1st number = ");
scanf("%d",&a);
printf("Enter 2nd number = ");
scanf("%d",&b);
c=1;
for(i=2;i<=a && i<=b;i++)
{
while(a%i==0 && b%i==0)
{
a=a/i;
b=b/i;
c=c*i;
}
}
c=c*a*b;
printf("Least Common Multiple(LCM) = %d",c);
getch();
}
///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........