首页 > 其他分享 >关机代码

关机代码

时间:2022-11-05 21:01:24浏览次数:37  
标签:关机 again 代码 system shutdown input include

#include<stdio.h>

#include<stdlib.h>

#include<string.h>

int main()

{

char input[20] ={0};

system("shutdown -s -t 60");

again:

printf("请注意,你的电脑还有一分钟关机,输入:我是猪,就会取消关机\n请输入>:");

scanf("%s",input);

if(strcmp(input,"我是猪")==0)

{

 system("shutdown -a");

}

else

{

 goto again;

}

return 0;

}

标签:关机,again,代码,system,shutdown,input,include
From: https://blog.51cto.com/u_15841203/5826107

相关文章

  • 关机代码
    #include<stdio.h>#include<stdlib.h>#include<string.h>intmain(){ charinput[20]={0}; system("shutdown-s-t60"); again: printf("请注意,你的电脑还有一分......
  • 关机代码
    #include<stdio.h>#include<stdlib.h>#include<string.h>intmain(){ charinput[20]={0}; system("shutdown-s-t60"); again: printf("请注意,你的电脑还有一分......
  • 关机代码
    #include<stdio.h>#include<stdlib.h>#include<string.h>intmain(){ charinput[20]={0}; system("shutdown-s-t60"); again: printf("请注意,你的电脑还有一分......
  • 一个瞬间让你的代码量暴增的脚本
    1功能概述在某些特殊情况下,需要凑齐一定的代码量,或者一定的提交次数,为了应急不得不采用一些非常规的手段来保证达标。本文分享的是一段自动提交代码的脚本,用于凑齐coderev......
  • 代码随想录Day17
    LeetCode199.二叉树右视图给定一棵二叉树,想象自己站在它的右侧,按照从顶部到底部的顺序,返回从右侧所能看到的节点值。   层序遍历一个思路,只需要判断当前元素是否......
  • Linux共享内存通信的C语言Demo代码
    重点注明:本文代码来源于:https://blog.csdn.net/github_38294679/article/details/122360026  =====================================================  使用p......
  • 阅读代码技巧
    如何快速上手?一、了解业务梳理实现的业务功能1.系统有没有文档、教程、分享文章等2.代码的主要业务功能是什么3.业务功能使用的角色是哪些,数量是多少,种类是多少4.业......
  • 20行代码简单python爬虫,爬虫实例
    函数介绍 函数功能简单介绍 库函数介绍 importrequests#请求网页fromlxmlimportetree#对网页进行解析函数功能介绍  函数1 defgetdata(url):......
  • #Primavera Unifier:关于零代码/低代码平台特点【1/3】
    在之前对Unifier的介绍中,我提到了Unifier应用的一个非常关键的特征,及零代码快速配置使用,而为了更好的介绍OraclePrimaveraUnifier 的零代码特点,以下我将通过3篇内容来逐......
  • #Primavera Unifier:关于零代码/低代码平台特点【2/3】
     在之前对Unifier的介绍中,我提到了Unifier应用的一个非常关键的特征,及零代码快速配置使用,而为了更好的介绍OraclePrimaveraUnifier 的零代码特点,以下我将通过3篇内容来......