LCM
#include<stdio.h>
#include<conio.h>
void main()
{
int a,lcm;
clrscr();
printf("enter any number which you want lcm");
scanf("%d",&a);
for(a=1;a>b?a:b;lcm++)
if(lcm%a==0 && lcm%b==0)
printf("%d",lcm);
getch();
}
Post a Comment