0
已解决
王铄
中级守护
中级守护
#include<bits/stdc++.h>
#include<Windows.h>
#include<conio.h>
#include<direct.h>
using namespace std;
int mm,wl,choose,gg=1,v=200,cnt=1;
void cls(){
system("cls");
}
//0.亮白 1.亮青 2.亮绿 3.紫 4.红 5.亮黄 6.蓝 7.白 8.深红 9.青底黑 10.紫底黑 11.深紫 12.土黄 13.灰 14.深青
void color(int a){if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE);if(a==11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE);if(a==12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN);if(a==13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);if(a==14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE);}
void kj(){
color(7);
cout<<"\n\n\n\n\t\t\t 正在开机......\n\t\t\t wonka 1.1系统\n\n\t\t\t ";
color(6);
for(int i=1;i<=6;i++){
Sleep(1000);
cout<<"■";
}
color(7);
Beep(1046,266);
cout<<"\n\t\t\t 开机完成";
Sleep(3000);
cls();
color(5);
cout<<"\n\n\t\t\tw";
Sleep(100);
cout<<"o";
Sleep(100);
cout<<"n";
Sleep(100);
cout<<"k";
Sleep(100);
cout<<"a";
Sleep(100);
cout<<" ";
Sleep(100);
cout<<"系统";
Sleep(1000);
color(7);
cls();
}
void dl(){
cout<<"设置密码:";
cin>>mm;
int mm1,cnt=1;
cls();
while(1){
cout<<"输入密码:";
cin>>mm1;
if(mm1==mm){
color(2);
cls();
cout<<"密码正确";
Sleep(1000);
cls();
break;
}else{
cls();
color(4);
cout<<"密码错误,请重新输入";
Sleep(1000);
cls();
color(7);
}
}
}
void zy(){
color(7);
cls();
cout<<"\n wonka 1.1系统\n";
cout<<" 1---》关于wonka 1.1\n 2---》设置\n 3---》计算器\n 4---》网络(";
if(wl==0){
cout<<"未连接)";
}else if(wl==1){
cout<<"我的网络)";
}else if(wl==2){
cout<<"wonka Internet)";
}else if(wl==3){
cout<<"(*^▽^)//)";
}
cout<<"\n 5---》浏览器";
cout<<"\n 6---》720安全卫士";
cout<<"\n 7---》病毒(慎入)";
cout<<"\n 8---》我的电脑\n\t\t关机在设置里\n\t\t";
cin>>choose;
if(choose==1){
cls();
cout<<"wonka 1.0系统是仿照Windows系统,用C++创造的一个系统。\n目前版本为1.1,以后会更新\n请按任意键继续......";
getch();
zy();
}else if(choose==2){
cls();
cout<<"1.广告拦截\n2.关机\n3.本机信息\n";
cin>>choose;
cls();
if(choose==1){
cout<<"广告拦截状态:";
if(gg==1){
cout<<"关闭";
}else{
cout<<"开启";
}
cout<<"\n是否开启广告拦截?1:开启 其他数:关闭\n";
cin>>choose;
if(choose==1){
gg=0;
cout<<"\n广告拦截已开启";
}else{
gg=1;
cout<<"\n广告拦截已关闭";
}
Sleep(1000);
zy();
}else if(choose==2){
for(int i=1;i<=100;i++){
cls();
cout<<"正在关机\n";
cout<<"-------------\n";
cout<<"|关机进度:"<<i<<"%|\n";
cout<<"|-----------|\n";
Sleep(50);
}
cls();
cout<<"关机完成!";
Sleep(1000);
cls();
cout<<"再见,记得回来呀!";
return;
}else{
cout<<"本机信息:\nwonka 1.1版本\n创造于2024年1月4日\n本机描述:\n本机编号:6688";
Sleep(2000);
zy();
}
}else if(choose==3){
cls();
for(;;){
double a,b;
char c;
cout<<"输入算式(符号仅支持+ - * / ^ 得数保留五位小数)(仅可输入2个数)"<<endl;
cout<<"输入“数字&数字”退出"<<endl;
cin>>a>>c>>b;
if(c=='+'){
cout<<a<<"+"<<b<<"="<<a+b<<endl;
Sleep(1000);
system("cls");
}
if(c=='-'){
cout<<a<<"-"<<b<<"="<<a-b<<endl;
Sleep(1000);
system("cls");
}
if(c=='*'){
cout<<a<<"×"<<b<<"="<<(long double)a*b<<endl;
Sleep(1000);
system("cls");
}
if(c=='/'){
cout<<a<<"÷"<<b<<"="<<a/b<<endl;
Sleep(1000);
system("cls");
}
if(c=='^'){
long double s=pow(a,b);
cout<<a<<"^"<<b<<"="<<s<<endl;
Sleep(1000);
system("cls");
}if(c=='&'){
zy();
}
}
}else if(choose==5){
cls();
cout<<"-----------------------------+-x"<<endl;
cout<<"|Q https://____________________|"<<endl;
cout<<"| wk浏览器 |"<<endl;
cout<<"| -------------------------- |"<<endl;
cout<<"| | 1.哔哩哔哩| 2.黑网 | |"<<endl;
cout<<"| -------------------------- |"<<endl;
cout<<"| | 3.我的世界| 4.酷丁编程 | |"<<endl;
cout<<"--------------------------------"<<endl;
if(gg==1){
Sleep(3000);
cls();
cout<<"-----------------------------+-x"<<endl;
cout<<"|广告↓↓↓ |"<<endl;
cout<<"| 最新游戏上线啦! |"<<endl;
cout<<"| [挖宝石] |"<<endl;
cout<<"| 现在下载,还能免费拿99亿宝石!|"<<endl;
cout<<"| 心动不如行动,快去下载吧! |"<<endl;
cout<<"| →[点击此处下载领福利]← |"<<endl;
cout<<"--------------------------------"<<endl;
cout<<"|(不要广告?去设置开启广告拦截)|"<<endl;
cout<<"--------------------------------"<<endl;
Sleep(3000);
zy();
}
cin>>choose;
if(choose==1)system("start https://www.bilibili.com");
if(choose==2)system("start https://www.pranx.com/hacker");
if(choose==3){
cls();
color(4);
cout<<"\n!!!!!!本网站出问题啦,换个网站呗~";Sleep(3000);zy();
}
if(choose==4)system("start https://ke.kuding.cn/#/home");
}if(choose==4){
cout<<"网络状态:";
if(wl==0){
cout<<"未连接\n";
cout<<"请任意连接一个网络:\n1.我的网络\n2.wonka Internet\n3.(*^▽^)//\n";
}else if(wl==1){
cout<<"我的网络\n";
}else if(wl==2){
cout<<"wonka Internet\n";
}else if(wl==3){
cout<<"(*^▽^)//\n";
}
cin>>choose;
cout<<"\n连接完成";
if(choose==1){
wl=1;
}else if(choose==2){
wl=2;
}else if(choose==3){
wl=3;
}else{
wl=0;
}
Sleep(3000);
zy();
}else if(choose==6){
cls();
cout<<"\n\n\t\t\t720安全卫士\n\t\t正在开发中........";
Sleep(3000);
zy();
}else if(choose==7){
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
for(int i=1;i<=3;i++){
SetCursorPos(rand()%x,rand()%y);//鼠标移位
system("start https://ke.codingtang.com/tong/?id=13");
mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);//鼠标自动点击
Sleep(50);
}
}else if(choose==8){
cout<<"本机信息:\nwonka 1.0版本\n创造于2024年1月4日\n本机描述:\n本机编号:6688";
Sleep(3000);
zy();
}else if(choose==114514){
cls();
for(int i=1;i<=250;i++){
cout<<"11445141919810田所浩二(首) 臭臭臭臭臭臭臭臭臭臭\t";
Sleep(20);
}
Sleep(2000);
cls();
color(6);
cout<<"error system :D :D :D\nerror id:1145141919810\nwhy?\nBecause the number you entered is 114514.\nYour computer is useless,restart it!\n hahaha\n\n电脑错误\n错误代码:1145141919810\n故障原因:您输入的数字是114514\n你的电脑废了,重开吧!哈哈";
Sleep(6000);
cls();
return;
}
}
int main(){
srand(time(0));
kj();
dl();
zy();
}
可以提一提建议
密码改成了自定义的,不用解方程啦!!!(*^▽^*)
死机文本改了一下