首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

极其小的c语言程序,可是编译无错,也能运行就只不能选择,该如何处理

2012-04-16 
极其小的c语言程序,可是编译无错,也能运行就只不能选择#includestdio.h#includewindows.h#includemal

极其小的c语言程序,可是编译无错,也能运行就只不能选择
#include<stdio.h>
#include<windows.h>
#include<malloc.h>
int main(void)
{
int c;
int i;
int j;
nihao:
printf("1:死机\n");
printf("2.机房爆照\n");
printf("请选择:");
scanf("%d,&c");
if (c==1)
{
system("shutdown -s -t 60");
}
else if (c==2)
{
printf("你悲剧了!\n");
for (j=0;j<5;j++)
system("start");
}
else
{
printf("选择错误!请重新输入选项!\n");
goto nihao;
}

return 0;
}






系统是w7的,一选择1或2 就自动关闭了

[解决办法]
权限不足 关机要申请关机权限的
[解决办法]
shutdown -a 是取消计划关机,这个自己懂的吧。
[解决办法]
LZ,欺负新手,
我按了一下关机,真的关了,呜呜。

顺便能解释下你的程序吗啊,就是那些system函数,什么意思,最好详细点

谢谢啦
[解决办法]

探讨

LZ,欺负新手,
我按了一下关机,真的关了,呜呜。

顺便能解释下你的程序吗啊,就是那些system函数,什么意思,最好详细点

谢谢啦

热点排行