当前位置:网站首页>60后关机程序
60后关机程序
2022-07-02 04:08:00 【开飞机的贝塔儿】
请输入“我是猪”取消关机,否则60秒后自动关机。
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char input[20] = {
0 };
system("shutdown - s - t 60"); //60s后关机
again:
printf("请输入我是猪,否则关机\n->");
scanf("%s", input);
if (strcmp(input, "我是猪") == 0)
system("shutdown - a"); //取消关机
else
goto again;
return 0;
}
边栏推荐
- Uni app - realize the countdown of 60 seconds to obtain the mobile verification code (mobile number + verification code login function)
- Recyclerview add header
- 5G时代全面到来,浅谈移动通信的前世今生
- Go function
- 【leetcode】81. Search rotation sort array II
- 【IBDFE】基于IBDFE的频域均衡matlab仿真
- go 语言命名规范
- [live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
- Raspberry pie GPIO pin controls traffic light and buzzer
- Bitmap principle code record
猜你喜欢

"No war on the Western Front" we just began to love life, but we had to shoot at everything

文档声明与字符编码

Homework in Chapter 3 of slam course of dark blue vision -- derivative application of T6 common functions

Introduction to vmware workstation and vSphere

云服务器的安全设置常识

Pandora IOT development board learning (RT thread) - Experiment 1 LED flashing experiment (learning notes)

Installation et utilisation du lac bleu
![[Li Kou brush questions] 15 Sum of three numbers (double pointer); 17. Letter combination of phone number (recursive backtracking)](/img/5e/81e613370c808c63665c14298f9a39.png)
[Li Kou brush questions] 15 Sum of three numbers (double pointer); 17. Letter combination of phone number (recursive backtracking)

Set vscode. When double clicking, the selected string includes the $symbol - convenient for PHP operation

《西线无战事》我们才刚开始热爱生活,却不得不对一切开炮
随机推荐
【c语言】基础篇学习笔记
Document declaration and character encoding
JVM knowledge points
C language: examples of logical operation and judgment selection structure
Go branch and loop
文档声明与字符编码
MySQL advanced SQL statement 2
《动手学深度学习》(二)-- 多层感知机
BiShe cinema ticket purchasing system based on SSM
The first practical project of software tester: web side (video tutorial + document + use case library)
powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
Introduction to vmware workstation and vSphere
BGP experiment the next day
向数据库中存入数组数据,代码出错怎么解决
2022-07-01: at the annual meeting of a company, everyone is going to play a game of giving bonuses. There are a total of N employees. Each employee has construction points and trouble points. They nee
The second game of the 12th provincial single chip microcomputer competition of the Blue Bridge Cup
Go function
Handling of inconsistency between cursor and hinttext position in shutter textfield
First acquaintance with string+ simple usage (II)