Question: C++ Calculator using a Stack. In this assignment I can't use a library and must implement my own stack. For this program, the calculator should

C++ Calculator using a Stack. In this assignment I can't use a library and must implement my own stack. For this program, the calculator should take in a string containing an infix expression while computing and printing out the result. It should be able to handle operators such as +, -, *, /, and parenthesis.

All the numberss are single digits and the result of the calculations are also single digit. So 5 + 3 is valid because it produces a single digit 8. But 5+6 isn't because it produces 11. In the same vein, 11-2 wouldn't be valid because 11 is double digit. It should taken in valid inputs and also throw an error when it encounters an invalid string.

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!