文件名称:third2
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.45mb
- 下载次数:
- 0次
- 提 供 者:
- ba***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
2.编写程序实现表达式求值,即验证某算术表达式的正确性,若正确,则计算该算术表达式的值。
主要功能描述如下:
1、从键盘上输入表达式。
2、分析该表达式是否合法:
(1)是数字,则判断该数字的合法性。若合法,则压入数据到堆栈中。
(2)是规定的运算符,则根据规则进行处理。在处理过程中,将计算该表达式的值。
(3)若是其它字符,则返回错误信息。
3、若上述处理过程中没有发现错误,则认为该表达式合法,并打印处理结果。
-2. Write a program to achieve an expression, which verify the correctness of an arithmetic expression, if correct, the calculation of the arithmetic expression. Main features are described below: 1, from the keyboard input expression. 2, analysis of the expression is valid: (1) is a number, to determine the legality of the figure. If legal, is pushed into the data stack. (2) is to provide the operator, according to the rules for processing. In the process, the calculated value of the expression. (3) If the other characters, it returns an error message. 3, if the above process is not found error, that the legitimate expression, and prints the results.
主要功能描述如下:
1、从键盘上输入表达式。
2、分析该表达式是否合法:
(1)是数字,则判断该数字的合法性。若合法,则压入数据到堆栈中。
(2)是规定的运算符,则根据规则进行处理。在处理过程中,将计算该表达式的值。
(3)若是其它字符,则返回错误信息。
3、若上述处理过程中没有发现错误,则认为该表达式合法,并打印处理结果。
-2. Write a program to achieve an expression, which verify the correctness of an arithmetic expression, if correct, the calculation of the arithmetic expression. Main features are described below: 1, from the keyboard input expression. 2, analysis of the expression is valid: (1) is a number, to determine the legality of the figure. If legal, is pushed into the data stack. (2) is to provide the operator, according to the rules for processing. In the process, the calculated value of the expression. (3) If the other characters, it returns an error message. 3, if the above process is not found error, that the legitimate expression, and prints the results.
相关搜索: 表达式求值
(系统自动生成,下载前可以参看下载内容)
下载文件列表
third2
......\Debug
......\.....\third2.exe
......\.....\third2.ilk
......\.....\third2.obj
......\.....\third2.pch
......\.....\third2.pdb
......\.....\vc60.idb
......\.....\vc60.pdb
......\third2.cpp
......\third2.dsp
......\third2.dsw
......\third2.ncb
......\third2.opt
......\third2.plg
......\Debug
......\.....\third2.exe
......\.....\third2.ilk
......\.....\third2.obj
......\.....\third2.pch
......\.....\third2.pdb
......\.....\vc60.idb
......\.....\vc60.pdb
......\third2.cpp
......\third2.dsp
......\third2.dsw
......\third2.ncb
......\third2.opt
......\third2.plg