Hello! Im new to this board I posted earlier today and have been working on this program all day. I think I have it done. The program runs a few calculations then asks for some dimensions and then it does one last calculation. The math im not sure of is the amount of pools needed. the equation is to be volume of a grain ofwheat(20mm3) * amount of wheat/ volume of pool. I believe I have everything set right and I know im dealing with some large numbers, but the pool amount just seems too much
heres my code:
[php]
\n"; echo "Length: ".$length."m
\n"; echo "Width: ".$width."m
\n"; echo "Height: ".$height."m
\n"; echo "Volume: ".$vol."m3
\n"; echo "
\n"; echo "The Inventor received " . number_format($rice) . " grain(s) of wheat.
"; echo "The wheat weighs: ". number_format($weight). " mg.
"; echo "The amount of pools needed: ". number_format($needed). ".
"; } } // end calcvolume function displayForm(){ ?>
<!-- display html content -->
<h2>Calculate pool volume</h2>
<form method="post" action="assignment2.php" >
<table border="0">
<tr><td>Length:</td><td><input type="text" name="length" /></td></tr>
<tr><td>Width: </td><td><input type="text" name="width" /></td></tr>
<tr><td>Height: </td><td><input type="text" name="height" /></td></tr>
</table>
<p><input type="submit" name="submit" value="Calculate" />
<input type="reset" name="reset" value="Clear" /></p>
</form>
<?php
// back to php mode to end the function
}// end displayForm
?>
[/php]