堆栈应用,表达式求值,浮点数的很不错,代码简洁而易懂
一个实验文档,数据结构算法的实验课。很有参考价值,文档中有源代码。
输入一个表达式,以'#'号结束输入,可以有+,-,*,/,和括号,比如12-4*(5+2)# 算出来的结果为-16,结果和操作数的范围都在整型数范围内.主要用栈的思想,还应用了一些小技巧,看源程序对
算术表达式求值演示 大学时候自己做的 绝对可用清晰
算术表达式求值演示 大学时候的实验 自己做的 绝对清晰可用
该文档详细讲解了,使用栈结构实现表达式求值的过程,并且分析了可能遇到的难点,以及给出了相应的解决办法!!
表达式求值,用栈实现,C++,支持符号、括号、以及出错处理,程序健壮性应该比较好,本人自己编写,上传的压缩包中有一个运行环境为VS2005,另一个运行环境为VC6.0的源文件,可根据自己电脑的运行环境
简单数学表达式求值,只能进行+ - * / 和()的运算,先将中缀表达式转化为后缀表达式,再利用栈进行求解
只能进行10以内运算,以‘#’作为结束标志
运用了算符优先级的思想, 采用栈的数据结构,用C语言来实现。