#include <stdio.h>
#include <process.h>
#include <string.h>
int main()
{printf("你的电脑将在60秒后关机,请输入 我是猪 取消关机\n");system("shutdown -s -t 60");char input[20] = { 0 };scanf("%s", input);while (1){if (strcmp(input, "我是猪") == 0){system("shutdown -a");break;}}return 0;
}
把这个文件保存为release版本
就能在对应的项目文件夹里找到对应的.exe文件,这样就能把这个程序发给朋友了 ~