Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed 

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 ... 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

Visual C# How to Program

Authors: Paul J. Deitel, Harvey Deitel

6th edition

134601548, 134601793, 978-0134601540

More Books

Students also viewed these Programming questions

Question

The following picture shows which kind of hash

Answered: 1 week ago