#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{
system("color 37");
int a;
char b;
c: cout<<"您的计算机将在5秒内关机\n";
cout<<"准备好了吗?\n";
cout<<"A.准备好了 B.我再想想\n";
cin>>b;
if(b=='a'||b=='A')
{
Sleep(3000);
system("color 0c");
for(a=5;a>0;a--)
{
system("cls");
cout<<a;
Sleep(1000);
}
system("cls");
cout<<"关机吧!";
system("shutdown -s -t 0");
}
else
{
Sleep(3000);
system("cls");
goto c;
}
return 0;
}
文章来源地址https://uudwc.com/A/aYgLR
文章来源:https://uudwc.com/A/aYgLR