![]() |
CITS2002 Systems Programming |
← prev | next → | ![]() |
![]() |
|||
Using our stack in a Reverse Polish CalculatorLet's employ our stack data structure to evaluate basic integer arithmetic, as if using a Reverse Polish Calculator.Each integer read from lines of a file is pushed onto the stack, arithmetic operators pop 2 integers from the stack, perform some arithmetic, and push the result back onto the stack.
CITS2002 Systems Programming, Lecture 19, p6, 3rd October 2023.
|