Question: ( Rectangular Prism Calculator ) Write a program to calculate the surface area and volume of a rectangular prism and a capsule shape. Once, the

(Rectangular Prism Calculator) Write a program to calculate the surface area and volume of a rectangular
prism and a capsule shape. Once, the user has entered the following input:
length (l), width (w) and height (h) for the rectangular prism
radius (r) and side length (a) for the capsule
It will display the results in a formatted text output. Please it is important to declare all variables with the
appropriate data type. Use the following formulas:
Capsule
Volume =\pi r2((4/3)r + a)
Surface Area =2\pi r(2r + a)
Rectangular Prism
Volume = lwh
Surface Area =2(lw + lh + wh)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!