Assignment036

Math is fairly easy with PHP. You are already familiar with the most common math operators: # + Addition # - Subtraction # * Multiplication # / Division # % Modulus (returns the remainder between two numbers)

For example: math.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>math.php</title>
</head>

<body>

<?php

$additionanswer 
100+10;
//Online Calculator

Print("<h1> Online Calculator </h1>");

//Display math output
print ("100 + 10 = " . (100 10). " Addition <br>");
print (
"100 - 10 = ". (100-10) ." Subtraction <br>");
print(
"100 * 10 = ". (100*10) ." Multiplication <br>");
print(
"100 / 10 = ". (100/10) ." Division <br>");
print(
"99 % 10 = ". (99%10) ." Modulus (the remainder!) <br>");

?>

</body>
</html>


</body>
</html>