// Compiler : Dev-C++ 4.9.9.2
#include<stdio.h>
int main()
{
int n1,n2,x,y;
printf("A : ");
scanf("%d",&n1);
printf("B : ");
scanf("%d",&n2);
x=n1,y=n2;
while(n1!=n2)
{
if(n1>n2)
n1-=n2;
else
n2-=n1;
}
printf("L C M : %d",x*y/n1);
getch();
return 0;
}
Post a Comment