Solver Find the area of triangle if width and height is given
Algebra
->
Triangles
-> Solver Find the area of triangle if width and height is given
Log On
Geometry: Triangles
Geometry
Solvers
Solvers
Lessons
Lessons
Answers archive
Answers
Source code of 'Find the area of triangle if width and height is given'
This Solver (Find the area of triangle if width and height is given)
was created by by
hummingbird(0)
:
View Source
,
Show
,
Put on YOUR site
About hummingbird
:
==section input Input the following parameters of the triangle: Height H = *[input h=1] and Width W = *[input w=1] Find the Area of the Triangle ==section solution perl if($h<=0 || $w<=0) { print" Please enter the positive values ( >0 ) of parameter."; } else { my $a=1/2*$w*$h; print "In any triangle, Area is given by {{{A = (1/2)*W*H}}} In our case the desired value is: {{{A = (1/2)*$w*$h = $a}}} So, the answer is that the Area of the Triangle with given parameter is $a . For more on this topic, refer to <A HREF=Triangle.wikipedia>Triangle</A> "; } ==section output a, ==section check w=2 h=3 a=3