Advertisement
obernardovieira

Shutdown your computer

Sep 13th, 2013
162
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.  
  4. int main () {
  5.     char ch ;
  6.     printf ("Do you want to shutdown your computer now (y/n) \n ") ;
  7.     scanf ( "%c" ,& ch ) ;
  8.     if ( ch == 'y' || ch == 'Y' )
  9.         system ( "C:\\WINDOWS\\System32\\shutdown /s" ) ;
  10.     return 0 ;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement