C加加猜物品

#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;
        }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值