Simple Functions When the user runs this program, a menu is displayed showing options for various mathematical functions.

computer science

Description

Simple Functions When the user runs this program, a menu is displayed showing options for various mathematical functions. You are required to implement user-defined functions. You may also make use of the math library. You are required to implement the following functions: A. Linear B. Quadratic C. Cubic D. Squareroot E. Power F. Standard Deviation Here is a sample run: Welcome to Simple Functions. 1. Linear 2. Quadratic 3. Cubic 4. Squareroot 5. Power 6. Standard Deviation Please select your option (1-6):2 Please enter the parameters for your function: For function y = ax^2 + bx + c, enter a:2 For function y = ax^2 + bx + c, enter b:2 For function y = ax^2 + bx + c, enter c:2 For function 2x^2 + 2x + 2 x : y 0 : 2 1 : 6 2 : 14 3 : 26 4 : 42 5 : 62 6 : 86 7 : 114 8 : 146 9 : 182 Enter ‘again’ to perform another quadratic calculation, ‘main’ to return to the main menu, or ‘exit’ to quit the program:main Welcome to Simple Functions. 1. Linear 2. Quadratic 3. Cubic 4. Squareroot 5. Power 6. Standard Deviation Please select your option (1-6):4 Enter a non-negative value:9 The squareroot of 9 is 3. Enter ‘again’ to perform another squareroot calculation, ‘main’ to return to the main menu, or ‘exit’ to quit the program:main Welcome to Simple Functions. 1. Linear 2. Quadratic 3. Cubic 4. Squareroot 5. Power 6. Standard Deviation Please select your option (1-6):5 For function a^b, enter a:10 For function a^b, enter b:3 10 to the power of 3 is 1000. Enter ‘again’ to perform another power calculation, ‘main’ to return to the main menu, or ‘exit’ to quit the program:main


Related Questions in computer science category