• 个人简介

    #include<bits/stdc++.h> using namespace std; int b,c; double d,e; int main(){ cout<<"欢迎来到计算机计算程序"<<endl; cout<<"请问你要干嘛?"<<endl; cout<<"1.简单计算(一,二,三位数加减)"<<endl; cout<<"2.高级计算(多位数加减乘除多位数;多位数连乘连减连加连除;含有小中花括号;整数加减乘除小数,小数加减乘除小数)"<<endl; cout<<"请选择"<<endl; int a; cin>>a; if(a1){ cout<<"1.简单计算"<<endl; cout<<"一,二,三位数加减,计算开始"<<endl; char jdjs; cin>>b>>jdjs>>c; if(b/1b&&c/1c){ if(jdjs'+'){ cout<<b+c; }else if(jdjs=='-'){ cout<<b-c; }else{ cout<<"不包括"<<" "<<"关闭"; return 0; } } }else if(a2){ cout<<"2.高级运算"<<endl; char zdjs; cin>>d>>zdjs>>e; if(d/1000&&e/1000){ cout<<"四位数"<<endl; if(zdjs'+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; return 0; } }else if(d/10000&&e/10000){ cout<<"五位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else if(d/100000&&e/100000){ cout<<"六位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else if(d/1000000&&e/1000000){ cout<<"七位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else if(d/10000000&&e/10000000){ cout<<"八位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else if(d/100000000&&e/100000000){ cout<<"九位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else if(d/1000000000&&e/1000000000){ cout<<"十位数"<<endl; if(zdjs=='+'){ cout<<d+e; }else if(zdjs=='-'){ cout<<d-e; }else if(zdjs=='/'){ cout<<d/e; }else if(zdjs==''){ cout<<de; }else{ cout<<"没有这种符号"<<" "<<"关闭"; }return 0; }else{ cout<<"不包含字母"<<" "<<"关闭"; return 0; } }else{ cout<<"选择错误"<<" "<<"关闭"; return 0; } }

  • 通过的题目

  • 最近活动

    This person is lazy and didn't join any contests or homework.
  • 最近编写的题解

    This person is lazy and didn't write any solutions.
  • Stat

  • Rating

题目标签

系统测试
1