#include<stdio.h>//header file
#include<conio.h>//header file
void main() //starting of the main() function
{
int a,b,p,c,i,lcm;//declaration of the variables
clrscr();
printf("program that calculates the l.c.m. of two nos.");
printf("\n\n\n\t\t------------INPUT-------------");
printf("\n\nenter the two nos.to find their l.c.m.");//taking input from the
user
scanf("%d%d",&a,&b);
c=a*b;
if(a>b)
p=a;
else
p=b;
for(i=p;i<=c;i++)
{
if(i%a==0 && i%b==0)
{
lcm=i;
break;
}
}
printf("\n\n\n\t\t------------OUTPUT------------");
printf("\n\nthe l.c.m. is =%d",lcm);//printing output
getch();
}