Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Heres an example of a C program called Lab3Acpp that calculates the surface area of a cylinder based ...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