关机程序代码
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main()
{
?? ?char input[20] = { 0 };
?? ?system("shutdown -s -t 60");
again:
?? ?printf("電腦將在一分鐘之內關閉,如果輸入我是豬,將取消關機 請輸入:>");
?? ?scanf("%s", input);
?? ?if ((strcmp(input, "我是豬")) == 0)
?? ?{
?? ??? ?system("shutdown -a");
?? ?}
?? ?else
?? ?{
?? ??? ?goto again;
?? ?}
?? ?getchar();
?? ?getchar();
}
總結
- 上一篇: 2019年上半年系统分析师上午真题及答案
- 下一篇: 关于steam