- 10
- 0
- 约6.42千字
- 约 23页
- 2017-06-05 发布于河南
- 举报
C四则运算源程序代码(国外英文资料)
C++四则运算源程序代码
# include iostream
# include cmath
Using namespace STD.
Const int MAX = 1000;
/ * welcome module * /
The class Entry
{
Public:
The static void welcome ()
{
Cout = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \ n
Welcome to use the * * arithmetic system \ n
* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * \ n
* author: dan-dan zhang * \ n
* * \ n
* student number: 1109121101 * \ n
* * \ n
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \ n \ n \ n
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = to enter the main program = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \ n \ n
please enter the expression and return the car:
}
};
/ * input module * /
The class Input
{
Public:
Input ()
{
For (int I = 0; I MAX; I + +)
Str_input [I] = \ 0;
}
Char Str_input (MAX);
Void inStr ()
{
Cin Str_input;
}
};
/ * output module * /
The class Output
{
Public:
The Output ()
{
Result = 0;
}
Void getRes (double res)
{
Result = res;
}
Void printRes ()
{
The result of the expression cout
}
Private:
Double the result;
};
/ * the storage structure of the calculated use * /
The template class Type
The class STACK {
Private:
Type base (MAX);
Int Size;
Public:
The STACK ()
{
Size = 0;
};
Void push (Type a)
{
The base [Size] = a;
Size++;
}
Type the pop ()
{
返回基地(——大小);
}
int大小()
{返回大小;}
};
/ *计算的模块* /
类jisuan
{
公众:
bool shuhanshu(char);
bool fuhanshu(char);
int jckh(char);
bool jcxsd(char *);
int pdyxj(char);
双数据(char *);
双调用(双、双字符);
int ppkh(char *缓冲区,int pos);
空Opr(堆栈的,堆栈的,;;;
双计算(char *、双);
};
bool jisuan::shuhanshu(char ch)
{
返回(ch = 0 ch = 9 )| | ch = = 。)?真的:假;
}
bool jisuan::fuhanshu(char ch)
{
返回(ch = = + | | ch = = - | | ch = =‘*’| | ch = = / | | ch = = # )?真的:假;
}
int jisuan::jckh(char ch)
{
如果(ch = = ()
返回1;
如
您可能关注的文档
最近下载
- 企业研发活动统计107-1、107-2报表版整理版(2021年-2022年).pdf VIP
- XX中学校2026年春季学期安全工作计划与应急演练安排表.docx VIP
- 园林植物配置与应用PPT课件.pptx VIP
- DB33/1006-2017 浙江省住宅设计标准.docx VIP
- HGT 4684-2014 液氯泄漏的处理处置方法.docx VIP
- IMT_2030(6G)推进组-通信行业:6G可信内生安全架构研究报告.docx VIP
- 亨格瑞成本与管理会计(第16版) 课件 Chapter 1 The Manager and Management Accounting .pptx
- 人教版高中化学选择性必修第2册 第三章 晶体结构与性质 第三节 金属晶体与离子晶体(一).ppt VIP
- 2025年全媒体运营师全媒体5G传播应用与传统媒体传输方式对比专题试卷及解析.pdf VIP
- IMT_2030(6G)推进组-通信行业:6G通信感知一体化评估方法研究报告.docx VIP
原创力文档

文档评论(0)