那位高手帮在下编译一个程序 感激不尽

wenjun8888
05-04-19 0 110

(2005-04-19 15:06:05) DEAN
1.create an empty stack to hold operands
2.if the token is an operand,push it onto stack
if the token is an operator, then pop the stack to get operand1, and pop the stack again to get operand2
perform 0operand2 0perator 0perand1
push the result back on the stack
3.after all input has been processed, the stack should contain only 1 valuein in it -the result of evaluating the expression