C++四则运算源程序代码(国外英文资料).docVIP

  • 10
  • 0
  • 约6.42千字
  • 约 23页
  • 2017-06-05 发布于河南
  • 举报

C++四则运算源程序代码(国外英文资料).doc

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; 如

文档评论(0)

1亿VIP精品文档

相关文档