Question
Formatted Table : Write a program in C++ to print a small formatted table showing the radius, diameter, circumference, and area of two circles according
Formatted Table: Write a program in C++ to print a small formatted table showing the radius, diameter, circumference, and area of two circles according to the following specifications:
Prompt the user to enter the radius of two circles (in cm).
Display 3 tables. Each table should consist of the table number, the heading, and the values of radius, diameter, circumference, and area using the specified formatting.Table 1: Use the following formatting:
Use the table heading shown in the sample output
Left justification
Fixed format
3 digits after the decimal point
Show trailing zeros
Table 2: Use the following formatting:
Use the table heading shown in the sample output
Right justification
Fixed format
5 digits after the decimal point
Show trailing zeros
Table 3: Use the following formatting:
Use the table heading shown in the sample output
Left justification
Scientific format
2 digits after the decimal point
Show trailing zeros
|
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