Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (43 sloc) 1.91 KB
<!DOCTYPE html>
<html data-require="math">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Least common multiple</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="vars">
<var id="C">randRange( 2, 6 )</var>
<var id="START_A">randRange( 1, 10 )</var>
<var id="START_B">randRangeExclude( 1, 10, [ START_A ] )</var>
<var id="A">START_A * C</var>
<var id="B">START_B * C</var>
<var id="BIGGER">Math.max( A, B )</var>
<var id="SMALLER">Math.min( A, B )</var>
<var id="PRODUCT">A * B</var>
<var id="GCD">getGCD( A, B )</var>
<var id="LCM">PRODUCT / GCD</var>
<var id="MULTIPLES">getMultiples( BIGGER, LCM )</var>
<div class="problems">
<div class="question">
<p>What is the least common multiple of <var>A</var> and <var>B</var>?</p>
<p>Another way to say this is:</p>
<p><code>\lcm(<var>A</var>, <var>B</var>) = {?}</code></p>
<p class="solution" data-forms="integer"><var>LCM</var></p>
<div class="hints">
<p>The least common multiple is the smallest number that is a multiple of <var>A</var> and <var>B</var>.</p>
<p>We know that <var>A</var> x <var>B</var> (or <var>PRODUCT</var>) is a common multiple,
but is it the least common multiple?</p>
<p>Write out the multiples of <var>BIGGER</var> until we find a number divisible by <var>SMALLER</var>.</p>
<span data-each="MULTIPLES as M"> <var>M</var>, </span>
<p>So, <var>LCM</var> is the least common multiple of <var>A</var> and <var>B</var>.</p>
Jump to Line
Something went wrong with that request. Please try again.