rendered paste body<html>
<title>Welcome to my page</title>
<head><b>Table of Sines, Cosines, and Tangents</b></head>
<body><center><table border>
<?
$output=$_POST['output'];
if ($output == "degrees")
{
echo '<tr><td>x</td><td>Tan</td><td>Sin</td><td>Cos</td></tr>';
for($i = 0; $i <= 360; $i=$i+15)
{
echo "<tr><td>$i</td>";
echo '<td>'.($i==90?'Undefined': $i==270?'Undefined': round(tan(rad2deg($i)), 5)).'</td>';
echo '<td>'.round(sin(rad2deg($i)), 5).'</td>';
echo '<td>'.round(cos(rad2deg($i)), 5).'</td></tr>';
}
}
//This is for Pierce College CS554 Lab 3
//All code copyleft Nick M Appledude24@gmail.com
else
{
echo '<tr><td>x</td><td>Tan</td><td>Sin</td><td>Cos</td></tr>';
for($i = 0; $i <= 360; $i=$i+15)
{
echo "<tr><td>$i</td>";
echo '<td>'.($i==90?'Undefined': $i==270?'Undefined': round(tan($i), 5)).'</td>';
echo '<td>'.round(sin($i), 5).'</td>';
echo '<td>'.round(cos($i), 5).'</td></tr>';
}
}