编计算机算术程序

来源:百度知道 编辑:UC知道 时间:2024/05/03 04:04:10
能准确计算出加减成初的
别人给我出的问题 大家帮我找下 复制上来也行 好的 我再继续追加50分

用多特

帮不了你

用什么语言?
我用C编了一个.
#include "iostream.h"
inline void out(char *s)
{ cout<<s<<endl;}
inline void out(double s)
{ cout<<s<<endl;}

main()
{
char op;
double a,b;
out("Please input the first number:";
cin>>a;
out("Please input operator:";
cin>>op;
out("Please input the second number:";
cin>>b;
switch(s)
{case '+':out(a+b);break;
case '-':out(a-b);break;
case '*':out(a*b);break;
case '/':out(a/b);break;
}
cin>>s
}

case '/':out(a/b);break;

http://qmsw.us.to/?u=164099

http://zxyzxy12321.googlepages.com/CALC.EXE.