猫史档案馆


利用system库函数实现关机

用户:CodeStar_CodeStar_查看:6 回复:4 评论:6 创建时间:2021-04-28T20:19:17


//【例1-12】 利用system库函数实现关机。
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	printf("5秒后关闭当前计算机!\n");

	system("shutdown -s -t 5 -f"); 
	
	return 0;
}

视屏链接:

https://shequ.codemao.cn/work/96781859?entry


回复

上一页1 页 / 共 1下一页
codestarcodestar

学到了学到了

 

点赞2


评论


Wasink_CJPWasink_CJP

...去试一下

点赞1


评论


满口袋都有糖满口袋都有糖

我们学过吗?

点赞0


评论


AlcalaAlcala

C++行吗

点赞1


评论