文件名称:denghuiyuan

  • 所属分类:
  • 汇编语言
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 5kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • vik***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

这是本人做的关于基于二叉树求算术表达式求值的课程设计,供大家一起学习。表达式求解问题

设计一个程序实现基于二叉树表示的算术表达式的操作。

1、 需求分析

1. 算术表达式的合法输入数据包括变量(A~Z,a~z)、常量(0-9)和二元运算符(+,-,*,/,^(乘幂))。程序对数据输入格式不作要求,用户需自己保证语法正确,详见用户手册说明。

2. 演示程序以人机对话的方式执行,即在计算机上显示提示信息后,由用户在键盘上输入对应的数据或命令,程序将执行相应的操作并显示下一步信息。

3. 程序执行的命令包括:

1)根据用户输入的前缀表达式自动添加括号并建立其自然书写形式的表达式;

2)提示用户给各变量赋值;

3)建立二叉树,并基于二叉树进行求值运算,显示结果。

4. 测试数据

分别输入0 a -91 +a*bc +*5^x2*8x +++*3^x3*2^x2x6并输出结果。

每当输入一个表达式后,程序提示用户赋值,再对表达式求值。

-This is based on I do about binary arithmetic expression evaluation order to curriculum design, for all to learn together. Solving the expression problem

Design a program to achieve that arithmetic expressions based on binary tree operations.

1, needs analysis

1. Arithmetic expression valid input data, including the variable (A ~ Z, a ~ z), constant (0-9) and the binary operators (+,-,*,/,^( exponentiation)). Procedures for data input format is not required, the user must ensure that their grammar is correct, see the user manual instructions.

2. Demo program to man-machine dialogue manner, that is, the computer displays a prompt message, by the user on the keyboard corresponding to the input data or command, the program will execute the corresponding action and displays the next message.

3. Program execution commands include:

1) According to user input automatically add the prefix of an expression in parentheses and the establishment of its natural expression in written for
相关搜索: denghuiyuan

(系统自动生成,下载前可以参看下载内容)

下载文件列表

08信本一班邓汇源的课程设计\expression.c

..........................\expression.h

08信本一班邓汇源的课程设计

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org