Pages

Thursday, July 18, 2013

C PROGRAM TO SHUT DOWN COMPUTER

01#include<stdio.h>
02#include<stdlib.h>
03using namespace std;
04 
05main()
06{
07char ch;
08 
09printf("Do you want to shutdown your computer now (y/n)n");
10scanf("%c",&ch);
11 
12if (ch == 'y' || ch == 'Y')
13system("C:\WINDOWS\System32\shutdown /s");
14 
15return 0;
16}

No comments:

Post a Comment