Question: Write a C++ program called Lab3A.cpp that reads input from the keyboard and prints output to the screen using cin and cout, respectively. Specifically,

Write a C++ program called Lab3A.cpp that reads input from the keyboard 

Write a C++ program called Lab3A.cpp that reads input from the keyboard and prints output to the screen using cin and cout, respectively. Specifically, you are to write a C++ program that does the following to calculate the surface area of a cylinder as follows: r = radius h = height h Assign the value 3.14 to a variable called pi. Prompt for and read in the radius of the cylinder. Prompt for and read in the vertical height of the cylinder. Calculate the area of the trapezoid using the formula Area = 2r2 + h(2r) where r is the radius, h is the height, and it is pi. Be sure to use the pow() function to calculate the radius squared. Print the area result of the cylinder in a meaningful message to the terminal.

Step by Step Solution

3.46 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres an example of a C program called Lab3Acpp that calculates the surface area of a cylinder based ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!