初学者的计算器
#include <iostream>
void fun()
{
using namespace std;
cout << “please in put an intger: “<<endl;
double x;
cin >> x;
cout << “please in put another intger: “<<endl;
double y;
cin >> y;
cout << "please in put operater + - * /: "<<endl;
char ch;
cin >> ch;
if(ch == 43)
cout << "x + y is " << x+y << endl;
else if(ch == 45)
cout << "x - y is " << x-y << endl;
else if(ch == 42)
cout << "x * y is " << x*y << endl;
else if(ch == 47)
cout << "x / y is " << x/y << endl;
else
cout << "nothing ... " <<endl;
}