Solver Find the surface area and volume of a cone
Algebra
->
Volume
-> Solver Find the surface area and volume of a cone
Log On
Geometry: Volume, Metric volume
Geometry
Solvers
Solvers
Lessons
Lessons
Answers archive
Answers
Source code of 'Find the surface area and volume of a cone'
This Solver (Find the surface area and volume of a cone)
was created by by
hummingbird(0)
:
View Source
,
Show
,
Put on YOUR site
About hummingbird
:
==section input Input the following parameters of the cone: H = *[input h=1] R = *[input r=1] ==section solution perl if($r<=0 || $h<=0){ print" Please enter the positive values ( >0 ) of parameter!!!"; } else{ my $s = sqrt($r*$r+$h*$h); my $sa = 3.14159265*$r*$s; my $sa2 = $sa+ 3.14159265*$r*$r; my $v = (1/3)*3.14159265*$r*$r*$h; print "The surface area (SA) of a cone, without including the base area is given by {{{SA = pi*R*S}}} where S is the slant height of the cone given by {{{S= sqrt(R^2+H^2)}}} When the base area is included, the surface area becomes {{{SA = pi*R*S + pi*R^2}}} The volume of the cone can be found by the formula {{{V=(1/3)*pi*R^2*H}}} In our case the desired values are thus: S = {{{sqrt($r^2+$h^2) = $s}}} SA (without base) = {{{pi*$r*$s = $sa}}} SA (with base) = {{{pi*$r*$s + pi*$r^2 = $sa2}}} V = {{{(1/3)pi*$r^2*$h = $v}}} For more on this topic, refer to <A HREF=Surface_area.wikipedia>Surface area</A> and <A HREF=Volume.wikipedia>Volume</A>. "; } ==section output s, sa, v, ==section check h=3 r=4 s=5 sa=62.831853 v=50.2654824