Question: create a C + + program that will calculate the volume of a cone. The program should have the following four functions: One function that
create a C program that will calculate the volume of a cone. The program should have the following four functions:
One function that will ask the user to enter an integer between and inclusive, as the radius and return the radius. If the radius is not between and the program will ask the user to enter another radius. The function only returns a number between and Name the function as radius
One function that randomly generates a number between and inclusive, and returns the random number. Name the function as height
One function, named volume that takes the radius and height from the functions radius and height respectively, as arguments and calculates the volume of a cone using the formula:
volume PI radius height
The PI value should be declared as a constant global variable with value
The function returns the calculated volume as a float or double number.
One function that prompts the result is
The volume of a cone with radius of cm and a height of cm is cm
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
