Computers and Technology

C++ CODE

Consider the following program in which the statements are in the incorrect order.

Rearrange the statements in the following order so that the program prompts the user to input:

The height of the base of a cylinder
The radius of the base of a cylinder
The program then outputs (in order):

The volume of the cylinder.
The surface area of the cylinder
Format the output to two decimal places.

#include

#include

int main()

{}

double height;

cout << "Volume of the cylinder = "

<< PI * pow(radius, 2.0) * height << endl;

cout << "Enter the height of the cylinder: ";

cin >> radius;

cout << endl;

return 0;

double radius;

cout << "Surface area: "

<< 2 * PI * radius * height + 2 * PI * pow(radius, 2.0)

<< endl;

cout << fixed << showpoint << setprecision(2);

cout << "Enter the radius of the base of the cylinder: ";

cin >> height;

cout << endl;

#include

const double PI = 3.14159;

using namespace std;

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, Angelanova69134
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
image
Computers and Technology, 23.06.2019 09:00, 19youngr
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, bsonicx
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
Do you know the correct answer?
C++ CODE

Consider the following program in which the statements are in the incorrect or...

Questions in other subjects:

Konu
Mathematics, 22.11.2019 21:31