文件名称:WinRAR
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:6.32kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一个表达式和一个二叉树之间,存在着自然的对应关系。写一个程序,实现基于二叉树的表示的算术表达式Expression的操作。
基本要求
1.ReadExpr(E) 以字符序列的形式输入语法正确的前缀表示式并够着表达式E。
2.WriteExpr(E) 用带括弧的中缀表达式输出表达式E。
3.Assign(V,c) 实现对变量V的赋值(V=c),变量的初值为0。
4.Value(E) 对算术表达式E求值。
5.CompoundExpr(P,E1,E2) 构造一个新的复合表达式(E1)P(E2)。
-Between an expression and a binary tree, there is a natural correspondence relationship. Write a program to achieve the operation of the binary tree-based representation of the arithmetic expression Expression. The basic requirements for input grammatically correct prefix expressions 1.ReadExpr (E) in the form of a sequence of characters and enough with the expression E. 2.WriteExpr (E) output expression E infix expression with parentheses. 3.Assign (V, c) the assignment of the variable V (V = c), the initial value of the variable to 0. 4.Value (E) E evaluates arithmetic expressions. 5.CompoundExpr (P, E1, E2) to construct a new composite expressions (E1) P (E2).
基本要求
1.ReadExpr(E) 以字符序列的形式输入语法正确的前缀表示式并够着表达式E。
2.WriteExpr(E) 用带括弧的中缀表达式输出表达式E。
3.Assign(V,c) 实现对变量V的赋值(V=c),变量的初值为0。
4.Value(E) 对算术表达式E求值。
5.CompoundExpr(P,E1,E2) 构造一个新的复合表达式(E1)P(E2)。
-Between an expression and a binary tree, there is a natural correspondence relationship. Write a program to achieve the operation of the binary tree-based representation of the arithmetic expression Expression. The basic requirements for input grammatically correct prefix expressions 1.ReadExpr (E) in the form of a sequence of characters and enough with the expression E. 2.WriteExpr (E) output expression E infix expression with parentheses. 3.Assign (V, c) the assignment of the variable V (V = c), the initial value of the variable to 0. 4.Value (E) E evaluates arithmetic expressions. 5.CompoundExpr (P, E1, E2) to construct a new composite expressions (E1) P (E2).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
数据结构表达式类型的实现.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.