写完了不敢运行
  • 板块灌水区
  • 楼主mwr001
  • 当前回复7
  • 已保存回复7
  • 发布时间2024/9/20 11:23
  • 上次更新2024/9/20 15:24:35
查看原帖
写完了不敢运行
747609
mwr001楼主2024/9/20 11:23

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

#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;
}
2024/9/20 11:23
加载中...