#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int plus_1,plus_2,plus_4,plus_8;
void _zjm() {
cout<<"+++++++++++++++++++++++++++++++++++++++++++++"<<endl;
cout<<"+ 猜物品 +"<<endl;
cout<<"+++++++++++++++++++++++++++++++++++++++++++++"<<endl;
cout<<endl;
cout<<"-------------------------------------------------------------------------------"<<endl;
cout<<"|这里有15个物品: |"<<endl;
cout<<"|战斗机,熊猫,芬达,雪碧,王者荣耀,笔,橡皮,北约,美国,石头,圆规,尺子,日本,牛,老虎 |"<<endl;
cout<<"|请在心里想一个并记住它,回答我的4个问题: |"<<endl;
cout<<"-------------------------------------------------------------------------------"<<endl;
}
void _1st() {
cout<<"|===============================================================|"<<endl;
cout<<"|你想的物品是不是:战斗机,芬达,王者荣耀,橡皮,美国,圆规,日本,老虎?|"<<endl;
cout<<"|===============================================================|"<<endl;
cout<<"有请按0,没有请按1:";
int a;
cin>>a;
cout<<endl<<endl;
if(a==0) plus_1=1;
if(a==1) plus_1=0;
}
void _2nd() {
cout<<"|=====================================================|"<<endl;
cout<<"|你想的物品是不是:熊猫,芬达,笔,橡皮,石头,圆规,牛,老虎?|"<<endl;
cout<<"|=====================================================|"<<endl;
cout<<"有请按0,没有请按1:";
int b;
cin>>b;
cout<<endl<<endl;
if(b==0) plus_2=2;
if(b==1) plus_2=0;
}
void _3rd() {
cout<<"|=========================================================|"<<endl;
cout<<"|你想的物品是不是:雪碧,王者荣耀,笔,橡皮,尺子,日本,牛,老虎?|"<<endl;
cout<<"|=========================================================|"<<endl;
cout<<"有请按0,没有请按1:";
int c;
cin>>c;
cout<<endl<<endl;
if(c==0) plus_4=4;
if(c==1) plus_4=0;
}
void _4th() {
cout<<"|=======================================================|"<<endl;
cout<<"|你想的物品是不是:北约,美国,石头,圆规,尺子,日本,牛,老虎?|"<<endl;
cout<<"|=======================================================|"<<endl;
cout<<"有请按0,没有请按1:";
int d;
cin>>d;
cout<<endl<<endl;
if(d==0) plus_8=8;
if(d==1) plus_8=0;
}
int main() {
_zjm();
_1st();
_2nd();
_3rd();
_4th();
if(plus_1+plus_2+plus_4+plus_8==0) {
while(1) {
cout<<" 别******************耍赖! 别******************耍赖! 别******************耍赖! 别******************耍赖!"<<endl;
}
}
if(plus_1+plus_2+plus_4+plus_8==1) {
cout<<"你想的物品是:战斗机。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==2) {
cout<<"你想的物品是:熊猫。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==3) {
cout<<"你想的物品是:芬达。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==4) {
cout<<"你想的物品是:雪碧。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==5) {
cout<<"你想的物品是:王者荣耀。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==6) {
cout<<"你想的物品是:笔。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==7) {
cout<<"你想的物品是:橡皮。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==8) {
cout<<"你想的物品是:北约。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==9) {
cout<<"你想的物品是:美国。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==10) {
cout<<"你想的物品是:石头。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==11) {
cout<<"你想的物品是:圆规。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==12) {
cout<<"你想的物品是:尺子。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==13) {
cout<<"你想的物品是:日本。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==14) {
cout<<"你想的物品是:牛。"<<endl;
}
if(plus_1+plus_2+plus_4+plus_8==15) {
cout<<"你想的物品是:老虎。"<<endl;
}
while(plus_1+plus_2+plus_4+plus_8!=0) {
cout<<"您还想再玩一次这个游戏吗? 想(1) 不想(2): ";
int in;
cin>>in;
if(in==1){
system("cls");
_zjm();
_1st();
_2nd();
_3rd();
_4th();
}
else{
system("cls");
cout<<"感谢您的参与! GOODBYE!";
break;
}
}
return 0;
}
C加加猜物品
最新推荐文章于 2024-10-11 16:16:14 发布