C语言表达式计算器
为了方便了解流程,在程序中把计算过程也输出了.而且栈操作的实现部分也是自己实现的.[C0W6L(Z.I Zh!|程序用两个栈,optr寄存运算符,opnd寄存操作数和运算结果.输入的表达式以等号结束,例如:2*(1+2)= m_n;rg
/**************表达式计算器************/
#include <stdio.h>
#include <stdlib.h>x8Y/ld;w0?G/|h4H
#include <string.h>:n-J?8L#tf$brQ
#include <conio.h>"hJ"c:A!W5|kT
#include <malloc.h>.ED VPvA%iw
;P5uns-f/h-d7~
#define STACK_SIZE 100
#define APPEND_SIZE 10g3y7{4]l2Z)gX
struct SNode{
float data; /*存放操作数或者计算结果*/}G:Wx y(~
char ch; /*存放运算符*/
};