Lesson goal: Finding the Least Common Multiple (LCM)

Previous: A better GCD calculator | Home | Next: Finding common denominators using the LCM

If the past lessons on GCDs (here and here weren't enough for you, we now turn our attention to the LCM which stands for "least common multiple." The LCM is the smallest number that is a multiple of two numbers.

We introduce it here because the LCM can be calculated from the GCD using this formula:

$$LCM(a,b)=\frac{a\cdot b}{GCD(a,b)}$$

Now you try. Try completing the LCM function below using GCD function and the formula above.

Type your code here:

See your results here: