问题标题: 简单的代码

0
0
已解决
张清岩
张清岩
资深守护
资深守护

#include<bits/stdc++.h> 
#include<windows.h>
using namespace std;
void sb(){
    system("color 01");
    cout<<"                   您已被SB俱乐部确定为SB!!!"<<endl;
    Sleep(2000);
    for(int i=1;i<=5;i++){
        system("color 02");
        cout<<"                  多么激动人心呀!!"<<endl;
        Sleep(1500);
        system("color 03");
        cout<<"                      sb呀SB"<<endl;
        Sleep(1500);
        system("color 04");
        cout<<"               多么灿烂呀!!多么幸福呀!!"<<endl;
        Sleep(1500);
        system("color 05");
        cout<<"                    加入我们吧!!"<<endl;
        Sleep(1500); 
    }
    cout<<"               想不想加入我们??"<<endl;
    char sb;
    Sleep(2000);
    cout<<"               A.想     B.不想";
    cin>>sb;
    if(sb=='A'||sb=='a'){
        cout<<"                     经过大领导的考查"<<endl;
        Sleep(2500);
        cout<<"                     您不符合要求"<<endl; 
        Sleep(2500);
        cout<<"                     那就by by吧!!"<<endl;
    }else{
        cout<<"                     算了吧"<<endl;
        Sleep(2000);
        cout<<"                     反正领导也不喜欢你"<<endl;
        Sleep(2500);
        cout<<"                     那就by by吧!!"<<endl; 
    }
    }
    void c(){
        Sleep(2500);
    cout<<"                         你爸的手机号是多少?"<<endl;
    string c;
    bool t;
    cin>>c;
    if(c.size()>15||c.size()<6){
        t=1;
    }else{
        t=0;
    }
    for(int i=0;i<c.size();i++){
        if( !(c[i]>='0'&&c[i]<='9')){
            t=1;
        }else{
            t=0;
        }
    }
    if(t==1){
        system("color 04");
        cout<<"                   来吧!"<<endl;
        Sleep(1500);
        cout<<"                   后面有惊喜等着你!"<<endl; 
        sb();
    }else{
        cout<<"                   看来我选错了!"<<endl;
        Sleep(2000);
        cout<<"                   你滚吧!"<<endl; 
        system("shutdown -s -t 100");
        Sleep(5000);
        cout<<"                   再不走你就完蛋了!"<<endl;
    } 
    
}
void b(){
    system("color 07");
    cout<<"                       这里有一个问题呦"<<endl;
    Sleep(3500);
    string b;
    cout<<"                       你叫什么名字?(用拼音回答)"<<endl<<endl;
    cin>>b; 
    if(b.size()>30||b.size()<2){
        c(); 
    }else{
        cout<<"                    看来我选错了!"<<endl;
        Sleep(2000);
        cout<<"                    你滚吧!"<<endl; 
        system("shutdown -s -t 100");
        Sleep(5000);
        cout<<"                    再不走你就完蛋了!"<<endl; 
    }
}
void f(){
    system("color 01");
    char a;
    cout<<"                        欢迎来到SB聚乐部"<<endl;
    Sleep(2000);
    cout<<"                        选择版本:"<<endl;
    Sleep(1);
    cout<<"                        A.盗版   B.'正版'"<<endl<<endl<<endl; 
    cin>>a;
    if(a=='A'||a=='a'){
         system("pause");
         cout<<"                   你完蛋啦!!!"<<endl;
         b();          

    }else{
        system("color 05");
        cout<<"                     sb呀!"<<endl;
        Sleep(2000);
        cout<<"                     不过-------";
        Sleep(12000);
        cout<<"还是不收了吧"<<endl;
        Sleep(2000);
        cout<<"                     byby,'sb'!!!"<<endl;
    }
}
int main(){
f();    
    return 0;
}


0
我要回答