This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 2/3 PROBLEM STATEMENT: HW #9, Problem 2 SOLUTION: 1) HELP comments: % Prepared by Brian Lubnow on 10/23/2011. %Program is designed to calculate the surface area and the volume of polygon prism based on its height and the length of its sides 2) Outputs of program For a polygon prism with height= 2.00 cm And 3 sides of side length=.50 cm Surface area = 3.22 cm^2 And volume= .22cm^3 For a polygon prism with height= 2.00 cm And 6 sides of side length=.50 cm Surface area = 7.30 cm^2 And volume= 1.30cm^3 For a polygon prism with height= 2.00 cm And 9 sides of side length=.50 cm Surface area = 15.18 cm^2 And volume= 3.09cm^3 12R-CF 10/24/2011 ENGE1114-HW 9 Lubnow, Brian 3/3 3)Flowchart Start INPUT MaxSides Increment Side Length Height FOR N from 3 through MaxSides by Increment Abase=N*S^2/4*tand(180/N) Perim=N*S V=Abase*H SA=2*Abase+Perim*H MaxSides=0 Increment=0 Side Length=0 Height=0 SA=0 V=0 Abase=0 Perim=0 STOP OUTPUT SA, V...
View Full Document
- Fall '06