Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (36 sloc) 1.5 KB
<!DOCTYPE html>
<html data-require="math math-format graphie graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Subtracting decimals</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_FLOAT &gt; B_FLOAT">
<var id="A">randRange( 101, 999 )</var>
<var id="B">randRange( 101, 999 )</var>
<var id="A_DECIMAL">2</var>
<var id="B_DECIMAL">2</var>
<var id="A_FLOAT">A / pow( 10, A_DECIMAL )</var>
<var id="B_FLOAT">B / pow( 10, B_DECIMAL )</var>
</div>
<div class="problems">
<div>
<p><code>\Huge{<var>localeToFixed(A_FLOAT, A_DECIMAL)</var> - <var>localeToFixed(B_FLOAT, B_DECIMAL)</var> = {?}}</code></p>
<div class="solution" data-type="decimal"><var>A_FLOAT - B_FLOAT</var></div>
</div>
</div>
<div class="hints">
<div class="graphie" id="numbers">
graph.adder = new DecimalSubtractor( A, A_DECIMAL, B, B_DECIMAL );
graph.adder.show();
graph.adder.showDecimals();
</div>
<div class="graphie" data-each="DecimalSubtractor.numHintsFor( A, A_DECIMAL, B, B_DECIMAL ) times" data-update="numbers">
graph.adder.showHint();
</div>
</div>
</div>
</body>
</html>