恶搞代码
2024-08-18 18:58:19
发布于:浙江
恶搞代码,请勿模仿
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
typedef long long ll;
int main(){
//恶搞代码
cout<<"是否选择关机(是:yes 否:no)"<<endl;
string s;
cin>>s;
if(s=="no"){
cout<<"no也没用!";
}
cout<<"正在关机……"<<endl;
cout<<"你的电脑将在60秒后关机"<<endl;
Sleep(1000);
system("shutdown -s -t 60");
cout<<"大声喊爹取消关机"<<endl;
Sleep(1000);
string a;
while(true){
cout<<"我是你的什么?"<<endl;
cin>>a;
if(a=="爹"||a=="爸爸"||a=="爸"||a=="die"||a=="ba"||a=="baba"){
system("shutdown -a");
break;
}else{
cout<<"不对哦"<<endl;
}
}
system("cls");
Sleep(5000);
cout<<"你以为结束了吗"<<endl;
Sleep(500);
cout<<"不,还没有"<<endl;
Sleep(500);
cout<<"看我的弹窗炸弹!!!"<<endl;
while(true){
MessageBox(NULL,"你的电脑已被我控制","提示",MB_OK);
}
return 0;
}
全部评论 3
Ctrl+Alt+Delete关闭就好了
2025-02-15 来自 广东
0我要试一试
2025-02-15 来自 浙江
0//关机程序 #include <iostream> #include <chrono> #include <thread> #include <string> using namespace std; using namespace std::chrono; int main() { int countdown = 60; cout << "您打开了关机程序,是否选择关机?(是:Yes,否:No)\n"; string ans; cin >> ans; if(ans == "No") { cout << "\r您选择了取消。"; for(int i = 1; i <= 5; i++) { cout << "\r...正在取消..."; this_thread::sleep_for(std::chrono::seconds(1)); } cout << "\r取消成功。"; exit(0); } cout << "\r您选择了确定。" ; this_thread::sleep_for(std::chrono::seconds(1)); cout << "\r电脑将在 " << countdown << " 秒后关机。" << endl; while (countdown > 0) { this_thread::sleep_for(seconds(1)); // 等待1秒 cout << "\r" << "剩余时间: " << countdown << " 秒" << flush; countdown--; } cout << "\r关机倒计时结束。 " << endl; this_thread::sleep_for(std::chrono::seconds(1)); cout << "正在关机......\n" ; system("shutdown /s /t 0");//关机程序 }
2024-08-18 来自 浙江
0
有帮助,赞一个