▍1. expression
利用栈完成算术表达式求值:从键盘或文件中输入算术表达式,计算其结果并显示。要求处理过程为:(1)转换为后缀表达式并输出;(2)对后缀表达式求值并输出。 输入的表达式中可以有整数、实数、括号,运算符包括+、-、*、/、#(代表单目负)。可以多次输入不同的表达式进行计算,直到用户选择“退出”。栈的基本操作可以自己实现,也可以使用系统提供的STL实现。 (Done using an arithmetic expression evaluation stack: file input from the keyboard or an arithmetic expression, calculate and display the results. Requirements process: (1) to postfix expression and output (2) evaluation of the postfix expression and output. Enter the expression can be integers, real numbers, parentheses, operators including+,-,*,/,#( representatives unary minus). You can enter several different expressions are evaluated until the user selects " Exit." Stack can implement the basic operations, you can also use the system implementation of the STL.)