C语言操作windows的小程序

来源:互联网 发布:php 汉字转ascii 编辑:程序博客网 时间:2024/05/21 07:52
/*
 龌龊的程序
*/
#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(2==c)
{
printf("你太坏了,我要惩罚你!\n");
for( j=0 ; j<10 ; ++j)
system("start");
}
else
{
printf("你敲错了,请重新输入!\n");
goto nihao;
}
}
0 0
原创粉丝点击