Write an application (including algorithm) that uses the predefined functions, "sqrt" (square root), "pow" (power), "cbrt" (cube root), and "hypot" (hypotenuse).The declaration of these functions are contained in the "cmath" header file.
Therefore, that header file must be included in the application.
The application requires a loop that will run until the user makes a selection to "Quit". The application uses a menu (similar to Chapter 3 slide 108) that displays a list of choices.
1) Process Square Root Function
2) Process Power Function
3) Process Cube Root Function
4) Process Hypotenuse Function
Select a choice:
A switch statement is used to determine the choice. Each choice prompts for the information, calls the predefined function and displays the result.
This assignment has been answered 2 times in private sessions.
© 2021 Codify Tutor. All rights reserved