#include <stdio.h>
// Function to find the GCD of two numbers
int findGCD(int a, int b) {
while (b != 0) {
int temp = b;
b = a % b;
a = temp;
}
return a;
}
// Function to find the LCM of two numbers
int findLCM(int a, int b) {
int gcd = findGCD(a, b);
int lcm = (a * b) / gcd;
return lcm;
}
// Main function
int main() {
// Input two numbers
int num1, num2;
printf("Enter two numbers: ");
scanf("%d %d", &num1, &num2);
// Find and display the LCM
int lcm = findLCM(num1, num2);
printf("LCM of %d and %d is %d\n", num1, num2, lcm);
return 0;
}