good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: What is wrong with this code?by ww (Archbishop) |
on Jul 24, 2011 at 01:09 UTC ( [id://916364]=note: print w/replies, xml ) | Need Help?? |
In addition to toolic's and jethro's catches, note that the syntax of your formula for the area of a square isn't correct. It will give the area as (side times 2); you want $square_side**2 ($square_side to the power of 2, eg, squared).
Also, check your spelling (parallelogram and equilateral, for example), lest you teach li'l bro' errors and review your geometry text to check your title in the triangle formula. Other suggestions, depending on your taste:
Updated: to acknowledge jethro's excellent point, posted as I fiddled with minutia and eyepopslikeamosquito's catch on my brain-fart.
In Section
Seekers of Perl Wisdom
|
|