Jump to content

ziptop3

Member
  • Posts

    1
  • Joined

  • Last visited

Awards

This user doesn't have any awards

ziptop3's Achievements

  1. you could all proably do something better then this but takes input from user shutdown (nothing shudown -i can't solve) also the at command was scary so i didn't use that for certain time any idea's for specific time shutdown please message me #include<stdio.h>int main(){ float sec = 0; float minu; float hour; int temp; int dec; char shut[80]; printf("1) shut down after a time \n"); printf("2) cancel shutdown \n"); scanf("%d",&dec); switch (dec) { case 1: printf("Please enter how many hours: "); scanf("%f",&hour); //printf("\n"); temp = (int)hour; //printf("%d \n",temp); minu = hour - temp; hour -= minu; //printf("%f\n",minu); minu = minu*60; sec = minu*60; sec += (hour*60)*60; //printf("%f",sec); temp = (int)sec; //printf("%d",temp); sprintf(shut,"shutdown /s /t %d", temp); system(shut); break; case 2: system("shutdown /a"); break; default: ("nice job mate"); break; } return 0;} check out that sexy switch case
×