The following code shows how to Find the Least Common Multiple of Two Numbers in C.

// Find Least Common Multiple (LCM) of Two Numbers

#include <stdio.h>

int main()
{
    int first, second, i, lcm, last;
    printf("Enter First Number: ");
    scanf("%d", &first);
    printf("Enter second Number: ");
    scanf("%d", &second);

    if(first<second)
        last=second;
    else
        last=first;
    for(i=last;;i++)
    {
        if((i%first==0) && (i%second==0))
        {
            lcm=i;
            break;
        }
    }
    printf("LCM of %d and %d is %d", first, second, lcm);
    
    return 0;
}

Output

Enter First Number: 264
Enter second Number: 16
LCM of 264 and 16 is 528


Further Reading

50+ C Programming Interview Questions and Answers

C Program to Find Factorial of a Number