文件名称:实验2
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个程序,演示用算符优先法对算术表达式求值的过程。利用算符优先关系,实现对算术四则混合运算表达式的求值。
(1)输入的形式:表达式,例如2*(3+4)
包含的运算符只能有'+' 、'-' 、'*' 、'/' 、'('、 ')';
(2)输出的形式:运算结果,例如2*(3+4)=14;
(3)程序所能达到的功能:对表达式求值并输出(A program is designed to demonstrate the process of evaluating arithmetic expressions with the operator precedence method. The value of the arithmetic four expression is realized by using the operator priority relation.
(1) the form of input: expression, such as 2* (3+4)
The operator can only contain a '+' and '-', '*', ',' ('and')';
(2) the form of output: the result of operation, such as 2* (3+4) =14;
(3) the function that the program can achieve: the evaluation and output of the expression)
(1)输入的形式:表达式,例如2*(3+4)
包含的运算符只能有'+' 、'-' 、'*' 、'/' 、'('、 ')';
(2)输出的形式:运算结果,例如2*(3+4)=14;
(3)程序所能达到的功能:对表达式求值并输出(A program is designed to demonstrate the process of evaluating arithmetic expressions with the operator precedence method. The value of the arithmetic four expression is realized by using the operator priority relation.
(1) the form of input: expression, such as 2* (3+4)
The operator can only contain a '+' and '-', '*', ',' ('and')';
(2) the form of output: the result of operation, such as 2* (3+4) =14;
(3) the function that the program can achieve: the evaluation and output of the expression)
相关搜索: 数据结构
(系统自动生成,下载前可以参看下载内容)
下载文件列表
| 文件名 | 大小 | 更新时间 |
|---|---|---|
| 实验2\十进制转二进制.cpp | 1339 | 2017-10-19 |
| 实验2\十进制转二进制.exe | 395667 | 2017-10-25 |
| 实验2\表达式求值.cpp | 3066 | 2017-10-25 |
| 实验2\表达式求值.exe | 398425 | 2017-10-25 |
| 实验2 |
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
