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 rr a
Surface Area pi rr a
Rectangular Prism
Volume lwh
Surface Area lw lh wh
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
