数据结构 科学计算器.docVIP

  • 7
  • 0
  • 约 8页
  • 2017-03-03 发布于湖北
  • 举报
数据结构(C++)利用栈编写科学计算器 #includeiostream #includestring #includemath.h #includestdlib.h using namespace std; char a[100]; class Number{ public: double num[1000]; int top; void start(){ for(int i=0;i1000;i++) num[i]=0; top=-1; } void push(double a){ top++; num[top]=a; } double pop(){ double number=num[top];top--; return number; } double getTop(){ return num[top]; } }; class Oper{ public: char oper[1000]; int top; void start(){ oper[0]=#; for(int i=1;i1000;i++) oper[i]=NU

文档评论(0)

1亿VIP精品文档

相关文档