C program to find LCM of two numbers
Find the largest number that is divided by both the numbers.
int main ()
int n1, n2, max = 0;
scanf ("%d %d", &n1, &n2);
max = (n1 > n2) ? n1 : n2;
if (max % n1 == 0 && max % n2 == 0)
printf ("%d", max);