1. Write a program that evaluates an arithmetic expression in infix notation, without full parentheses. Use the following algorithm: There are two stacks: a numbers stack and an operators stack. When...


1. Write a program that evaluates an arithmetic expression in infix notation, without full parentheses. Use the following algorithm: There are two stacks: a numbers stack and an operators stack. When a number appears, push it onto the numbers stack. Any parenthesis or operator should be treated as described in Step 2 of Figure 6.10 on page 351—with one change. Whenever you pop an operation off the stack, you should immediately use that operation by popping two numbers, applying the operation, and pushing the answer back on the numbers stack.








Dec 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here