QWQ氏计算器English(v1.1.1)c++
Posted nameQWQ_CSDN
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了QWQ氏计算器English(v1.1.1)c++相关的知识,希望对你有一定的参考价值。
上次写了一个中文版的计算器,而翻译了以下以后,作者再写个英文的吧(文章特别水有木有)
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b;
char c;
cout<<"QWQ氏计算器English(v1.1.1)"<<endl;
cout<<"Only single operation is supported. If you want to continue the operation, you can only write down the result and run it again"<<endl;
cout<<"Please press any key to continue...";
getchar();
system("cls");
cout<<"Please enter two numbers:"<<endl;
cin>>a>>b;
cout<<endl<<"Please enter an operator (only + plus -minus * multiply / divide is supported):"<<endl;
cin>>c;
if(c=='+')
cout<<a+b;
if(c=='-')
cout<<a-b;
if(c=='*')
cout<<a*b;
if(c=='/')
{
cout<<a/b<<endl;
cout<<"A division sign has been detected. When the result is an infinite decimal, 6 decimal places are reserved";
}
return 0;
}
好了,此地无银三百两,大家散了吧,我是nameQWQ_CSDN,我们下次再相逢!
(特水)
小弟告辞。
以上是关于QWQ氏计算器English(v1.1.1)c++的主要内容,如果未能解决你的问题,请参考以下文章