Question: How to write this C++ program : C++ program How to write this program. The main function allows the user to pick from the menu.

How to write this C++ program :

C++ program How to write this program.

The main function allows the user to pick from the menu. Depending on what choice they make they will be prompted for all the values that will be needed to make the requested calculations. i.e. if the choose "1" then they will be asked for the radius and the height. The outputs must be similar to the following:

The volume of a cone with radius 5 and height 3.5 is 91.63.

The volume of a cone with radius 5.2 is 588.98.

The area of the octagon with side length 3.4 is 55.82.

The distance between the two give points is (3, 2) and (1.5, 6.5) is approximately 4.7434.

Required parts of the program:

You must use a "do while" loop to allow the user to choose from the menu.

You must use a "switch statement" to process the users choice.

You must use the above mentioned cmath functions in your calculations.

You must make a user define function for the fore mentioned formulas. Each function must have a prototype statement that is before the beginning of the "main" function with the function declaration after the end of the "main" function. Each function must receive all the values needed to make the calculation and return the result.

Program must be in C++.

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!