|
楼主 |
发表于 2022-12-29 17:13:57
|
显示全部楼层
//
// Created by huawei on 2021/9/5.
//
#include <stdio.h>
#include <windows.h>
int main(void)
{
int num;
system("title 友好的程序");
printf("请输入0-5之内的数字(你会回来谢我的):");
back:
scanf_s("%d", &num);
if (num == 0)
{
MessageBoxA(0, "世界将在5s内毁灭", "赶紧跑!", 0);
system("shutdown -s -t 5");
}
else if (num == 1)
{
MessageBoxA(0, "世界将在5s内重启", "即将重归宁静", 0);
system("shutdown -s -t 5");
}
else if (num == 2)
{
MessageBoxA(0, "看看你的C盘,有惊喜", "最好在1分钟后查看",0);
while (1)
{
system("惊喜>>c:\\惊喜.txt");
}
}
else if (num == 3)
{
system("ipconfig");
MessageBoxA(0, "我已经知道你在哪了", "我马上过来", 0);
}
else if (num == 4)
{
MessageBoxA(0, "保护视力", "从我做起", 0);
while (1)
{
system("color 0f");
system("color 1f");
system("color 2f");
system("color 3f");
system("color 4f");
system("color 5f");
}
}
else if (num == 5)
{
int answer;
system("shutdown -s -t 60");
MessageBoxA(0, "想取消?请在1分钟之内告诉我答案", "提示:6位数", 0);
printf("999*99*9=:");
scanf_s("%d", &answer);
if (answer == 890109)
{
MessageBoxA(0, "恭喜,您拯救了你的电脑", "你真是天才", 0);
system("shutdown -a");
}
else
MessageBoxA(0, "抱歉,您失败了", "您的电脑在恨你", 0);
}
else
{
MessageBoxA(0, "请输入1-5之内的数字", "明白不", 0);
goto back;
}
system("pause");
} |
|