Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started