标题:帮助小学生家长,判断怎样对待孩子
取消只看楼主
JasonBi
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2022-6-8
结帖率:0
已结贴  问题点数:20 回复次数:0 
帮助小学生家长,判断怎样对待孩子
#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;
    }
以上为源代码,希望能帮助到广大家长,嘻嘻
搜索更多相关主题的帖子: 小学生 游戏 cout 结束 孩子 
2022-06-09 12:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-509287-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030046 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved