C++ You are working for Texas Instruments on their new calculator project. You have been tasked with writing a program that will implement a number
C++
You are working for Texas Instruments on their new calculator project. You have been tasked with writing a program that will implement a number of mathematical functions that will be used in a new calculator. Unfortunately, cmath is broken and you are unable to use it! Thus, you have to write the functions from scratch. You will use a simple prefix format to enter a function to evaluate. In this format, the operation to execute comes first followed by the numbers to process. The following is an example of the types of inputs to your program that you might implement : (+ 2.3 3.5 --> This command should print the result of 2.3 + 3.5 to the screen.). Your program cannot use the cmath library and should read commands from the keyboard as strings and numbers as doubles. Your program should contain a function to print instructions. Your program should print instructions on how to use it when it first starts and when the user enters "help". The instructions should include a complete list of the functions that you implemented and how to use each one (include the value returned for invalid input parameters if necessary, see below). It is fine to group similar functions together in a single descriptive usage statement. Now:
Implement addition, subtraction, multiplication and division. You can use the +, -,*, / for these operations and they do not need to be implemented as functions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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