帮助小学生家长,判断怎样对待孩子
#include <iostream>using namespace std;
int main()
{
int a;
cout<<"*******************"<<endl;
cout<<" "<<endl;
cout<<" 游戏开始"<<endl;
cout<<" 你考了多少分?"<<endl;
cout<<" (请输入三科总成绩)"<<endl;
cout<<" "<<endl;
cout<<" ";
cin>>a ;
if(a<=0)
{
cout<<" 错误!"<<endl;
cout<<"*******************";
}
if(a<=0,a<50)
{
cout<<" "<<endl;
cout<<" 男女混合双打!"<<endl ;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a<=50,a<100)
{
cout<<" "<<endl;
cout<<" 女子单打!"<<endl;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a<=100,a<200)
{
cout<<" "<<endl;
cout<<" 做50张卷子!"<<endl;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a<=200,a<280)
{
cout<<" "<<endl;
cout<<" 做10张卷子!"<<endl;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a<=280,a<299)
{
cout<<" "<<endl;
cout<<" 买乐高!"<<endl;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a==300,a<301)
{
cout<<" "<<endl;
cout<<" 买iPad!"<<endl;
cout<<" 游戏结束!"<<endl;
cout<<" "<<endl;
cout<<"*******************";
}
else if(a==301,a<1000000000000000)
{
cout<<" "<<endl;
cout<<" 错误!"<<endl;
cout<<"*******************";
}
return 2;
}
以上为源代码,希望能帮助到广大家长,嘻嘻