Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5 . 2 8 Project 1 - Function Calculator This lab will be available until March 3 rd , 1 1 : 5 9 PM
Project Function Calculator
This lab will be available until March rd: PM EST
For Project you will design and implement a program that has a selection menu of mathematical operations. The user should select an option from the printed menu to perform that specific operation. The program will echo the selected function back to the user and then ask for a desired input argument for the selected function. The program will then perform the operation and return the result. The functions required for this program include: sinx cosx tanx sqrtx lnx and factorialx
Sample Menu:
Welcome to the ET Function Calculator.
Please enter a selection
Enter 'quit' or 'exit' to end the session.
sinx
cosx
tanx
sqrtx
lnx
factorialx
Selection
For trigonometric functions sine cosine, tangent the required input argument should be in degrees need to switch from default input of radians For sqrtx and lnx only use positive values. The final function, factorialx should accept integer values.
Process of execution:
Print the function menu and prompt user for a selection.
Take input and echo selection back to user.
Prompt user for input argument value.
Take and store input value for computation.
Perform appropriate operation based on menu selection.
Print the result.
Loop program to ask user for next operation.
Give user choice to "exit" or "quit" the program.
Your code will be evaluated through tests including: menu development, input selection, argument input, function computation, loop structure, and escape sequence.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started