首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

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

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

  • 资源大小:6.20 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分: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

文 件 列 表

表达式求值.doc
VIP VIP
0.181941s