Question: Create a C++ application to manipulate polynomials. The program will behave as a simple calculator that does addition, subtraction, multiplication, and division, all on polynomials.
Create a C++ application to manipulate polynomials. The program will behave as a simple calculator that does addition, subtraction, multiplication, and division, all on polynomials.
Use the reverse Polish calculator model (stack based) in your implementation. In the reverse Polish based calculator, the operands are entered first, followed by specifying the operation. The operands are pushed onto a stack. When an operation is performed, it pops its operands from the stack and pushes its result back onto the stack.
Assume the character ? denotes pushing an operand onto the stack. Also, the characters +, -, *, and /, represent the known arithmetic operations. The character = means printing the top of the stack without popping it off. Therefore, ? ? + = means reading two operands, then calculating and printing their sum.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
