Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) |10 peints| You've been hired by Orbital Ouls to complete a C++ consele application that takes a real-mumber radius in centimeters, and calculates the

image text in transcribed

1) |10 peints| You've been hired by Orbital Ouls to complete a C++ consele application that takes a real-mumber radius in centimeters, and calculates the following values: 11 // 12 //========= -=========== === 13 #include // For several general-purpose functions 14 #include // For file handling 15 #include // For formatted output 16 #include // For cin, cout, and system 17 #include // For string data type - Voume gf a spnere. V= (43m - Crumtwerce of a schore -C-2er - Surtace a of a spere: A-4mr Start with file Lab04-01. gpp, and make the following edits: 1) Complete the header comment. 2) Declare three constants: one for Pl with a value of 3.14159, and two column widths for printing 3) Declare four dauhle variables: Tadius (including a starting vahue), volume, circumference, and area. 4) Set the printing to always show three decimal places for each real number. 18 using namespace std; // So "std::cout" may be abbreviated to "cout" 19 20 int main() 21 { 22 5) Adl an application header using QUL staternents. 6) Add an application close using a coul statement. 7) Calculate and store values for volume, circumference, and area. 8) Adkd cous statements using formatted output manipulators (setw, left'right) to print the following four rows: Radius // Declare constants 23 24 // 25 // Declare variables // Valume 26 Circumference Surface area 27 28 And three colunms: A left-justified label. A tight-justiliod value. A left-justified umits (place one space before the units name to separate it from the second column). // Format real numbers // 29 30 31 // Show application header 32 // 33 34 // Calculate volume, circumference, and surface area // 35 Note that the division oporator needs a real number on at least one side to give an accurate result. Don't use escape sequences to print the output. The outyut shoald Jook like this: 36 37 // Show radius and outputs // 38 Welcome to Orbital Oate 39 ---------------------- - 40 4.000 c Radius: // Show application close // Volune: 268.082 cn*3 41 Cireunferance 25.133 cn 42 Surface area: 201.062 cnn2 43 End of Orbital Oafs 44 } O Focus Page 1 of 4 726 words

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

sharing of non-material benefits such as time and affection;

Answered: 1 week ago