长沙修复iphone6指纹:我的程序为什么运行不了

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 05:02:28
#include <iosteam>
using namespace std;
int main ()
{float a,b,c,d, x,y;
a=1,b=2,c=3,d=4;
if cin>>a>>x>>y>>endl;
cout<<x+y<<endl;
else if cin>>b>>x>>y>>endl;
cout<<x-y<<endl;
else if cin>>c>>x>>y>>endl;
cout<<x*y<<endl;
else if cin>>d>>x>>y>>endl;
cout<<x/y<<endl;
else cout<<"you put is wrong"<<endl;
return 0;
}

cin,endl,cout这几个变量你都没有定量,肯定会出错咯

rthrjh

endl 你定义了吗

当然是因为有错!