Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (41 sloc) 2.109 kB
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Multiplying and dividing negative numbers</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars" data-ensure="A &lt; 0 || B &lt; 0">
<var id="A">randRange(-9, 9)</var>
<var id="B">randRangeExclude(-9, 9, [0])</var>
<var id="C">A * B</var>
</div>
<div class="problems">
<div id="multiplying">
<p class="question"><code><var>A</var> \times <var>negParens(B)</var> = ?</code></p>
<div class="solution"><var>C</var></div>
<div class="hints">
<p data-if="A < 0 && B < 0">A negative times a negative is a positive.</p>
<p data-else-if="A < 0">A negative times a positive is a negative.</p>
<p data-else-if="A != 0">A positive times a negative is a negative.</p>
<p data-else=""><code>0</code> times any number is <code>0</code>.</p>
<p><code><var>A</var> \times <var>negParens(B)</var> = <var>C</var></code></p>
</div>
</div>
<div id="dividing">
<p class="question"><code><var>C</var> \div <var>negParens(B)</var> = ?</code></p>
<div class="solution"><var>A</var></div>
<div class="hints">
<p data-if="C < 0 && B < 0">A negative divided by a negative is a positive.</p>
<p data-else-if="C < 0">A negative divided by a positive is a negative.</p>
<p data-else-if="C != 0">A positive divided by a negative is a negative.</p>
<p data-else=""><code>0</code> divided by any number is <code>0</code>.</p>
<p><code><var>C</var> \div <var>negParens(B)</var> = <var>A</var></code></p>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.