#include <stdio.h>
#include <windows.h>
int main()
{
int hour;
int second;
printf(\"end hour(1~3)(0)취소) : \");
scanf(\"%d\", &hour);
second = hour * 3600;
switch(second)
{
case 0 :
system(\"shutdown /a\");
break;
case 3600 :
system(\"shutdown /f /s /t 3600\");
break;
case 7200 :
system(\"shutdown /f /s /t 7200\");
break;
case 9000 :
system(\"shutdown /f /s /t 9000\");
break;
default :
printf(\"Error\\n\");
}
return 0;
}
_getch () 라는 함수있음 . conio.h 헤더선언하면됨