Using the stack ADT - TechRepublic
General discussion
February 17, 2004 at 10:51 PM
adeq_cindy

Using the stack ADT

by adeq_cindy . Updated 22 years, 4 months ago

Source code for program that simulates the operation of a calculator by scanning an integer expression in postfix form and displaying its result.The program should push each integer operand onto the stack.When an operator is encountered, the top two operand are popped,the operation is perfomed on its operands, and its result is pushed back onto stack.The final result should be the value remaining on the stack when the end of the expression is reached.The scientific calculator should at least handle the +,-,*,/,(,) operations.

This discussion is locked

All Comments