Question: In this homework, you will write a C++ program that works as a simple calculator that performs only addition, subtraction, multiplication and division operations with

In this homework, you will write a C++ program that works as a simple calculator that performs only addition, subtraction, multiplication and division operations with many operands. Your program will ask the user to enter the expression that they want to be calculated. After receiving the input, the program will perform the necessary input checks. If there is an error in the expression, an appropriate message will be displayed and the user will be asked to enter another expression. If there are no errors in the input expression, then the calculated result will be displayed and the program will ask for another expression until the user enters a termination command. Termination commands are QUIT, quit, EXIT, exit, END and end.
Suggest you to use ATOI function
Below there is sample runs. Should be exactly same.
 In this homework, you will write a C++ program that works

Sample Run 2 Please enter an expression to calculate: 10/ Invalid entry. Please enter an expression to calculate: 1/2 0.5 Please enter an expression to calculate: 11-151 -140 Please enter an expression to calculate: EXIT GOOD BYE Press any key to continue . Sample Run 3 Please enter an expression to calculate: 1678+2508 4186 Please enter an expression to calculate: 56/-9 100/6*4 414.815 Please enter an expression to calculate: Invalid entry. Please enter an expression to calculate: 45*-1/9 Please enter an expression to calculate: 45*-1/-9 Please enter an expression to calculate: 45 +1/9 Please enter an expression to calculate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!