Computers and Technology, 25.02.2020 19:59 qvezne7683
The statements in the file main. cpp are in incorrect order. Rearrange the statements so that they prompt the user to input:
The shape type (rectangle, circle, or cylinder)The appropriate dimension of the shape. Note: For grading purposes place the cylinder height statement before the radius statement. The C++ program then outputs the following information about the shape:For a rectangle, it outputs the area and perimeterFor a circle, it outputs the area and circumferenceFor a cylinder, it outputs the volume and surface area. After rearranging the statements, your program should be properly indented. Here is the code out-of-order:using namespace std;#include int main(){ string shape; double height; #include cout << "Enter the shape type: (rectangle, circle, cylinder) "; cin >> shape; cout << endl; if (shape == "rectangle") { cout << "Area of the circle = " << PI * pow(radius, 2.0) << endl; cout << "Circumference of the circle: " << 2 * PI * radius << endl; cout << "Enter the height of the cylinder: "; cin >> height; cout << endl; cout << "Enter the width of the rectangle: "; cin >> width; cout << endl; cout << "Perimeter of the rectangle = " << 2 * (length + width) << endl; double width; } cout << "Surface area of the cylinder: " << 2 * PI * radius * height + 2 * PI * pow(radius, 2.0) << endl; } else if (shape == "circle") { cout << "Enter the radius of the circle: "; cin >> radius; cout << endl; cout << "Volume of the cylinder = " << PI * pow(radius, 2.0)* height << endl; double length; } return 0; else if (shape == "cylinder") { double radius; cout << "Enter the length of the rectangle: "; cin >> length; cout << endl; #include cout << "Enter the radius of the base of the cylinder: "; cin >> radius; cout << endl; const double PI = 3.1416; cout << "Area of the rectangle = " << length * width << endl; else cout << "The program does not handle " << shape << endl; cout << fixed << showpoint << setprecision(2); #include
Answers: 1
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
Computers and Technology, 25.06.2019 05:00
The ratio of men to women in a certain factory is 3 to 4 .there are 210 men.how many workers are there?
Answers: 2
The statements in the file main. cpp are in incorrect order. Rearrange the statements so that they p...
English, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Computers and Technology, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Physics, 10.11.2020 08:50
Mathematics, 10.11.2020 08:50
Physics, 10.11.2020 08:50