C.2 Chapter 3
C.2.1 Exercise 1:
false true true false false true true
C.2.2 Exercise 2:
Message 3.Age: 12. Shoe Size: 14
C.2.3 Exercise 3:
$fahr = -50;
$stop_fahr = 50;
print '<table>';
print '<tr><th>Fahrenheit</th><th>Celsius</th></tr>';
while ($fahr <= $stop_fahr) {
$celsius = ($fahr - 32) * 5 / 9;
print "<tr><td>$fahr</td><td>$celsius</td></tr>";
$fahr += 5;
}
print '</table>';
C.2.4 Exercise 4:
print '<table>';
print '<tr><th>Fahrenheit</th><th>Celsius</th></tr>';
for ($fahr = -50; $fahr <= 50; $fahr += 5) {
$celsius = ($fahr - 32) * 5 / 9;
print "<tr><td>$fahr</td><td>$celsius</td></tr>";
}
print '</table>';
|