Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int s;
- do{
- system("cls");
- printf("Apagar PC 1.0\nAutor: @nRikee93\n\nElige:\n1.Apagar\n2.Cancelar apagado.\n_");
- scanf("%d",&s);
- } while (s==1&&s==2);
- if(s==1){
- do{
- system("cls");
- printf("Apagar PC 1.0\nAutor: @nRikee93\n\nElige el retardo:\n1.Un minuto\n2.Diez minutos\n3.Media hora\n4.Una hora\n5.Dos horas\n6.Cinco horas\n\n_");
- scanf("%d",&s);
- } while(s<1||s>6);
- switch(s)
- {
- case 1: system("shutdown /s /t 60");
- break;
- case 2: system("shutdown /s /t 600");
- break;
- case 3: system("shutdown /s /t 1800");
- break;
- case 4: system("shutdown /s /t 3600");
- break;
- case 5: system("shutdown /s /t 7200");
- break;
- case 6: system("shutdown /s /t 18000");
- break;
- }
- }
- if(s==2){
- system("shutdown /a");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement