啊哈磊_编程从这里起步
标题:
怎么输入一个值来确定自动关机等待时间?
[打印本页]
作者:
18021914630
时间:
2020-2-23 17:43
标题:
怎么输入一个值来确定自动关机等待时间?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("你希望在多少秒后关机?(回车结束)");
scanf("%d",&a);
system("shutdown -s -t a");
return 0;
}
复制代码
作者:
Jesse1
时间:
2020-2-23 19:28
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("你希望在多少秒后关机?(回车结束)");
scanf("%d",&a);
system("shutdown -s -t %d",a);
return 0;
}
试试?
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2