shutdown小程序
生活随笔
收集整理的這篇文章主要介紹了
shutdown小程序
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#include <stdio.h>
#include <stdlib.h>
int main() { char cmd[30]; int tis;//時間單位為秒
printf("plz input a time in seconds: \n"); scanf("%d", &tis);
sprintf(cmd, "shutdown -r -t %d", tis); printf("%s", cmd); system(cmd);//請打開cmd窗口輸入命令 shutdown -a 取消操作
return 0; }
int main() { char cmd[30]; int tis;//時間單位為秒
printf("plz input a time in seconds: \n"); scanf("%d", &tis);
sprintf(cmd, "shutdown -r -t %d", tis); printf("%s", cmd); system(cmd);//請打開cmd窗口輸入命令 shutdown -a 取消操作
return 0; }
總結
以上是生活随笔為你收集整理的shutdown小程序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 价格是锂离子电池十分之一 铁空气电池将在
- 下一篇: 投资四千万元!哪吒汽车在安徽成立增程科技