写完了不敢运行

灌水区

mwr001 @ 2024-09-20 11:23:26

不强制性让你运行,但是有谁知道这份代码除了关机还有什么作用?

#include<bits/stdc++.h>
#include<conio.h>
#include<stdio.h>
#include<chrono>
#include<thread>
using namespace std;
//a->97
//z->122
//A->65
//Z->90
//"enter"->13
//"baskspace"->8
int a[10]={1,2,3,4,5,6,7,8},b[10]={999,0},tid[100]={1,1,4},id[100]={999,999,999,999,999},sb1=0,sb2=0,sb3=0;
void gj(){
    cout<<"\nWCNM!!!\n";
    system("shutdow /s /t 0");
}
void xw(){
    printf("SFKSYZ?(1/0)\n");
    int ans=getch();
    if(ans==48)
    gj();
    if(ans>49||ans<48){
        sb3++;
        if(sb3==3){
            gj();
        }
        cout<<"\nWoringAswer\n";
        std::this_thread::sleep_for(std::chrono::seconds(1));
        system("cls");
        xw();
    }
    cout<<"!\n";
    std::this_thread::sleep_for(std::chrono::seconds(1));
    system("cls");
}
void yz(){
    for(int i=0;i<8;i++){
        if(a[i]!=b[i]){
            cout<<"\nYZSB\n";
            sb2++;
            if(sb2==3){
                gj();
            }
            return;
        }
    }
    cout<<"\nYZCG\n";
    return;
}
void zh(){
    printf("QSRZH___.\n");
    int i=0;
    while(1){
        int ch=getch(); 
        if(ch>=48&&ch<=57){id[i]=ch-48;cout<<ch-48;}
        if(ch==8){
            if(i!=0){
                a[i-1]=0;
                i-=2;
                system("cls");
                printf("QSRZH___.\n");
                for(int j=0;j<=i;j++)
                cout<<id[j];
            }else i--;
        }
        if(ch==13){
            for(int j=0;j<i;j++){
                if(tid[j]!=id[j]){
                    cout<<"\nMYZGZH\n";
                    sb1++;
                    if(sb1==3){
                        gj();
                    }
                    std::this_thread::sleep_for(std::chrono::seconds(1));
                    system("cls");
                    zh();
                    return;
                }
            }
            printf("\nYSD\n");
            std::this_thread::sleep_for(std::chrono::seconds(1));
            system("cls");
            return;
        }
        i++;
    }
}
void mm(){
    int x=0;
    printf("QSRMM___.\n");
    for(int i=0;i<8;i++){
        int ch=getch();
        if(ch>=48&&ch<=57){b[i]=ch-48;cout<<"*";x++;}
        else if(ch==8){
            if(b[0]==999){
                cout<<"\nBL\n";
                gj();
                return;
            }
            i-=2;
            x--;
            system("cls");
            printf("QSRMM___.\n");
            for(int j=0;j<x;j++)
            cout<<"*";
        }else if(ch==13){
            i--;
        }
    }
    yz();
}
int main(){
    xw();
    zh();
    mm();
    return 0;
}

by Vsinger_洛天依 @ 2024-09-20 11:27:01

Furry控代码


by mwr001 @ 2024-09-20 11:28:09

@Vsinger_洛天依 请勿随意抹黑Furry控


by Magus @ 2024-09-20 11:28:56

编译错误


by qi__ @ 2024-09-20 11:28:58

坑机房同学


by mwr001 @ 2024-09-20 11:30:31

@Magus 在编译器选项中加上“-std=c++11”


by jiasimiao @ 2024-09-20 11:34:38

@qi__ 支持


by qi__ @ 2024-09-20 11:35:21

@jiasimiao 我就在机房,而且被同学看着


|