require_once("ws_functions.php");
function createEquation()
{
$max = 12;
$variable = chooseVariable();
$a = chooseSign()*chooseNumber($max);
$b = chooseSign()*chooseNumber($max);
$c = chooseSign()*chooseNumber($max);
$d = chooseSign()*chooseNumber($max);
$equation_type = chooseNumber(4);
switch($equation_type)
{
case 1: //addition
if(chooseSign()>0) //decide the order
echo $a." + "."".$variable." = $c";
else
echo "".$variable.""." + ".$a." = $c";
break;
case 2: //subtraction
echo "".$variable.""." – ".$a." = $c";
break;
case 3: //multiplication
echo $a."".$variable." = $c";
break;
case 4: //division
echo "
".$variable." | = $c |
";
echo "$a |
";
break;
} //end switch
} //end createEquation()
do_html_header("One Step Equations","Solve. NO CALCULATOR!");
echo "";
for($i=1;$i<=21;)
{
?>
.
|
|
|
1.
|
|
|
2.
|
|
|
|
|
if($i>100) break;
} //end for
echo "
";
do_html_footer();
?>