当前位置:网站首页>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
边栏推荐
猜你喜欢
1.2 preliminary pytorch neural network
ThreadLocal,看我就够了!
[2021 book recommendation] kubernetes in production best practices
this. getOptions is not a function
WebView displays a blank due to a certificate problem
ViewPager2实现画廊效果执行notifyDataSetChanged后PageTransformer显示异常 界面变形问题
第1章 NumPy基础
杂七杂八的学习
图像分类白盒对抗攻击技术总结
【2021年新书推荐】Artificial Intelligence for IoT Cookbook
随机推荐
[dynamic programming] triangle minimum path sum
GEE配置本地开发环境
Recyclerview batch update view: notifyitemrangeinserted, notifyitemrangeremoved, notifyitemrangechanged
【2021年新书推荐】Practical IoT Hacking
What did you do during the internship
[dynamic programming] longest increasing subsequence
Easyui combobox 判断输入项是否存在于下拉列表中
读书小记——Activity
AVD Pixel_ 2_ API_ 24 is already running. If that is not the case, delete the files at C:\Users\admi
ffmpeg常用命令
Android exposed components - ignored component security
【动态规划】三角形最小路径和
Component based learning (1) idea and Implementation
第8章 生成式深度学习
去掉状态栏
PyTorch中的一些常见数据类型转换方法,与list和np.ndarray的转换方法
cmder中文乱码问题
Five methods are used to obtain the parameters and calculation of torch network model
杂七杂八的学习
torch.mm() torch.sparse.mm() torch.bmm() torch.mul() torch.matmul()的区别