Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TASK 2 - iostream (20 marks): Write a C++ program to calculate the volume (V) and surface area (A) for a cylinder with parameters described

image text in transcribed
TASK 2 - iostream (20 marks): Write a C++ program to calculate the volume (V) and surface area (A) for a cylinder with parameters described below. In your program: 1. The radius and height values must be using 2 decimal points within the given data range stated below. 2. All the values for radius and height must be entered by the user using the keyboard. 3. Set the value of pi=3.1416 as a global variable. 4. The formulas for volume and surface area must be declared using arithmetic operators with relevant operator precedence application. Check the answers obtain from the program with manual calculation. Formula: r=2.55to3.75h=7.85to9.65 V=r2h A=2rh+2r2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions