Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

Students also viewed these Databases questions

Question

Describe key employee expectations.

Answered: 1 week ago