登录
首页 » 数据结构 » 题目:设计一个题目,演示用算符优先法对算术表达式求值的过程。 概要设计 1、顺序扫描中缀算术表达式,当读到数字时直接将其送至输出队列中; 2、当读到...

题目:设计一个题目,演示用算符优先法对算术表达式求值的过程。 概要设计 1、顺序扫描中缀算术表达式,当读到数字时直接将其送至输出队列中; 2、当读到...

于 2022-03-18 发布 文件大小:6.20 kB
0 262
下载积分: 2 下载次数: 1

代码说明:

题目:设计一个题目,演示用算符优先法对算术表达式求值的过程。 概要设计 1、顺序扫描中缀算术表达式,当读到数字时直接将其送至输出队列中; 2、当读到运算符时,将栈中所有优先级高于或等于该运算符弹出,送至输出队列中,再将当前运算符入栈; 3、当读入左括号时,即入栈; 4、当读到右括号时,将靠近栈顶的第一个左括号上面的运算符全部一次弹出,送至输出队列中,再删除栈中的左括号。 5、使用VS栈来存储读入的操作和运算结果,然后进行数字字符到数值的转换。 -Title: Design of a topic, presentation operator priority method with arithmetic expression evaluation process. Summary of design 1, the order of scanning arithmetic infix expressions, when they read numbers directly to the output queue 2, when they read operator, it will stack all priority higher than or equal to the operator pop-up , sent to the output queue, and then the current operator入栈 3, when read left brackets, that is, when入栈 4, when they read the right brackets, it will be near the Top-left of the first operator in brackets above All a pop-up, sent to the output queue, and then delete stacks of left brackets. 5, the use of VS stack to store read operation and computing the results of numeric characters and then proceed to the numerical co

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 预测算法,主要是一元n次方程的回归预测实现。* 预测分析...
    数据预测算法,主要是一元n次方程的回归预测实现。* 预测分析--本算法只适用于有明显线性趋势的数据 * 默认为一元二次曲线方程法 * * 本程序主要涉及有两个算法 * 1.用最小二乘原理找到线性方程组的系数和常数。 * 2.解线性方程组 * 本程序在解线性方程组中,由于考虑到收敛性问题未采用迭代法,而是采用Gauss-Jordan消去法来解决。-data prediction algorithm is mainly one yuan n equation forecast to achieve reunification.* Forecast and Analysis-- This algorithm applies only to clear linear trend data* default as a quadratic curve equation method** The procedure involves two main algorithm* 1. Using the principle of least squares linear equations to find the constants and coefficients.* 2. The solution of linear equations* The procedure for solving linear equations, due to convergence problems using iterative method, instead of using the Gauss-Jordan elimination method to solve.
    2023-06-09 07:00:02下载
    积分:1
  • VB图书管理程序
    VB 图书馆管理程序-VB library management procedures
    2022-05-06 16:53:13下载
    积分:1
  • data structure : procedures Chain
    数据结构:链表程序-data structure : procedures Chain
    2022-03-20 21:49:14下载
    积分:1
  • 造格雷码的分析程序,用于算法分析,用VC编写,可以造n位的格雷码...
    构造格雷码的分析程序,用于算法分析,用VC编写,可以构造n位的格雷码-Gray Construction Code Analysis Program for the analysis of algorithms, with VC preparation, can be constructed of n-Gray code
    2022-08-13 19:02:44下载
    积分:1
  • C2C电子商务二手交易网站
    资源描述一、安装说明:     1.将文件解压后上传至网站服务器目录下,通过web页面即可正常访问。     2.通过/admin/login.asp进入后台管理,管理员账号和密码均为admin     3.数据库位于/datum 下面#SecondHand.mdb,为了安全,其名称可以进行必要的修改。       相关文件为conn.asp,位于根目录和/admin中均有。 二、系统参数说明:     1.运行环境:Windows+IIS     2.开发语言:asp     3.数据库:access 2000
    2022-09-24 07:25:03下载
    积分:1
  • 一个通用的oracle OCI开发程序包
    一个通用的oracle OCI开发程序包-A generic oracle OCI development package
    2022-04-29 14:42:13下载
    积分:1
  • they use a C series of examples of the greedy algorithm, compressed bundle with...
    一个自己用C编的关于贪婪算法的例子,压缩包里带有原题目与原测试数据-they use a C series of examples of the greedy algorithm, compressed bundle with the original title and the original test data
    2022-07-28 15:33:21下载
    积分:1
  • Single linked list in reverse order, more than a stack of public storage space,...
    单链表倒序 ,多个栈公用一块存储空间,以及迷宫问题的求解 -Single linked list in reverse order, more than a stack of public storage space, as well as solving a maze problem
    2023-08-13 19:55:03下载
    积分:1
  • 方括号做的程序,用户可以输入括号,以及是否可以使用。
    用C做的括号匹配程序,可以检测用户输入的括号是否匹配并给出提示-C matching brackets do procedures, the user can input the brackets and whether the match is suggested
    2023-01-21 12:30:03下载
    积分:1
  • 详细描述了如何创建图的方法以及操作
    数据结构 详细描述了如何创建图的方法以及操作-Data structure described in detail how to create a map of methods and operations
    2023-05-20 13:55:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载