- 博客(31)
- 收藏
- 关注
c语言 整蛊小游戏 !!!!
让初学者获得成就感的编程小游戏
主要调用一些基本库函数windows.h。
#define _CRT_SECURE_NO_WARNINGS = 1;
#include <stdio.h>
#include <string.h>
#include <Windows.h>
#include <math.h>
int main()
{
char input[20] = { 0 };
system("shutdown -s -t 60");
again:
printf("电脑将在60秒后关机,输入我是猪,取消关机\n");
scanf("%s", input);
if (strcmp(input, "我是猪") == 0)
{
system("shutdown -a");
printf("取消关机");
}
else
{
goto again;
}
}
2024-01-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅