You can control shutdown function of your pc using C programming.
//code start
#include<stdio.h>
#include<stdlib.h>
int main()
{
while(1){
int a;
printf("2.shutdown\n3.Cancel\n:>");
scanf("%d",&a);
if(a==2){
system("shutdown -s -t 60");
}
else if(a==3){
system("shutdown -a");
}
}
return 0;
}
//code end
0 comments:
Post a Comment