Question: Create a C++ program to calculate the volume of a cylinder. The program should ask for the dimensions of the cylinder. calculate volume (volume =
Create a C++ program to calculate the volume of a cylinder. The program should ask for the dimensions of the cylinder.
calculate volume (volume = PI x radius x radius x height, PI=3.1415). In addition to main(), use the following two functions in your program:
getRadiusAndHeight(): a void function that asks radius and height. Use pass-by-reference to send these two items to main().
calcVolume(): a value returning function that calculates and returns the cylinder volume to main(). The main() function should display the volume on the computer screen.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
