当前位置:网站首页>Computer shutdown program
Computer shutdown program
2022-04-23 07:19:00 【Amyniez】
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char input[20] = {
0 };
system("shutdown -s -t 60");//set and time
again:
printf(" Your computer will shut down in a minute , Please enter : I am a pig , You can cancel the shutdown program \n Please enter :");
scanf("%s", input);
if (strcmp(input, " I am a pig ") == 0)
{
system("shutdown -a");//abolish
}
else
{
goto again;
}
return 0;
}
// It can also be used. while Statement implementation program
int main()
{
char input[20] = {
0 };
system("shutdown -s -t 60");//set and time
while (1)
{
printf(" Your computer will shut down in a minute , Please enter : I am a pig , You can cancel the shutdown program \n Please enter :");
scanf("%s", input);
if (strcmp(input, " I am a pig ") == 0)
{
system("shutdown -a");//abolish
break;
}
}
return 0;
}
版权声明
本文为[Amyniez]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230610096538.html
边栏推荐
- MarkDown基础语法笔记
- Handlerthread principle and practical application
- 给女朋友写个微信双开小工具
- Google AdMob advertising learning
- torch_ Geometric learning 1, messagepassing
- Reading notes - activity
- Pytorch trains the basic process of a network in five steps
- PaddleOCR 图片文字提取
- Three methods to realize the rotation of ImageView with its own center as the origin
- JNI中使用open打开文件是返回-1问题
猜你喜欢

Component learning (2) arouter principle learning

Itop4412 HDMI display (4.0.3_r1)

第8章 生成式深度学习

Project, how to package

this. getOptions is not a function

BottomSheetDialogFragment 与 ListView RecyclerView ScrollView 滑动冲突问题

c语言编写一个猜数字游戏编写

Google AdMob advertising learning

WebView displays a blank due to a certificate problem

Android清除应用缓存
随机推荐
this. getOptions is not a function
MySQL5. 7 insert Chinese data and report an error: ` incorrect string value: '\ xb8 \ XDF \ AE \ xf9 \ X80 at row 1`
Some common data type conversion methods in pytorch are similar to list and NP Conversion method of ndarray
Pytorch best practices and coding style guide
ProcessBuilder工具类
【2021年新书推荐】Kubernetes in Production Best Practices
Markdown basic grammar notes
第2章 Pytorch基础1
[2021 book recommendation] artistic intelligence for IOT Cookbook
Data class of kotlin journey
Cause: dx. jar is missing
The Cora dataset was trained and tested using the official torch GCN
树莓派:双色LED灯实验
Pytorch trains the basic process of a network in five steps
Reading notes - activity
Viewpager2 realizes Gallery effect. After notifydatasetchanged, pagetransformer displays abnormal interface deformation
电脑关机程序
机器学习笔记 一:学习思路
Using stack to realize queue out and in
第2章 Pytorch基础2