Advertisement
neo71

C PROGRAM TO SHUT DOWN COMPUTER

Nov 18th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. using namespace std;
  4.  
  5. main()
  6. {
  7. char ch;
  8.  
  9. printf("Do you want to shutdown your computer now (y/n)n");
  10. scanf("%c",&ch);
  11.  
  12. if (ch == 'y' || ch == 'Y')
  13. system("C:\WINDOWS\System32\shutdown /s");
  14.  
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement