Question: Write a program that prompts the user to enter 3 values of radius and then displays a table with radius, surface area, and volume. Required
Write a program that prompts the user to enter 3 values of radius and then displays a table with radius, surface area, and volume.
Required formatting:
Use the following heading:
radius(m) surface area(m^2) volume(m^3)
*****************************************
Column 1: 9 characters wide, 1 digit after the dp
Column 2: 19 characters wide, 2 digits after the dp
Column 3: 13 characters wide, 2 digits after the dp
Use a fixed format with right justification
Sample output:
| Radius m | Surface Area (m^2) | Volume (m^3) |
|---|---|---|
| (width=9) | (width-19) | (width=13) |
| 1.0 | 12.57 | 4.19 |
| 10.0 | 1256.64 | 4188.79 |
| 100.0 | 125663.71 | 188790.20 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
