Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (36 sloc) 1.34 KB
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Multiplying fractions</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<div data-ensure="getGCD(A, B) === 1">
<var id="A">randRangeNonZero(-9, 9)</var>
<var id="B">randRange(2, 9)</var>
</div>
<div data-ensure="getGCD(C, D) === 1">
<var id="C">randRangeNonZero(-9, 9)</var>
<var id="D">randRange(2, 9)</var>
</div>
</div>
<div class="problems">
<div>
<p class="question"><code>
<var>fraction(A, B)</var> \times
<var>fraction(C, D, false, false, false, C &lt; 0)</var>
</code></p>
<div class="solution" data-type="rational"><var>(A * C) / (B * D)</var></div>
</div>
</div>
<div class="hints">
<p><code>= \dfrac{<var>A</var> \times <var>negParens(C)</var>}{<var>B</var> \times <var>D</var>}</code></p>
<p><code>= \dfrac{<var>A * C</var>}{<var>B * D</var>}</code></p>
<p data-if="getGCD(A * C, B * D) !== 1 || A * C < 0"><code>= <var>fractionReduce(A * C, B * D)</var></code></p>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.