C语言表达式计算器
为了方便了解流程,在程序中把计算过程也输出了.而且栈操作的实现部分也是自己实现的.程序用两个栈,optr寄存运算符,opnd寄存操作数和运算结果.输入的表达式以等号结束,例如:2*(1+2)=:A"aK f,`}
/**************表达式计算器************/I V0bc#W5s-H
#include <stdio.h>8IaN:g,s!F&JV
#include <stdlib.h>
#include <string.h>vh$XB3e |m,D po
#include <conio.h>xMX(@'vM6i
#include <malloc.h>5w-VaO$U5@ba4H7i
#define STACK_SIZE 100
#define APPEND_SIZE 10 Am+c_9N3sIJk
struct SNode{
float data; /*存放操作数或者计算结果*/