C++ PROGRAM TO SHUTDOWN COMPUTER FOR XP Posted by Naitik Kundalia on September 23, 2013 Get link Facebook X Pinterest Email Other Apps 1.Copy the given code .And Please read the comment of the program /*SHUTDOWN COMPUTER(XP)*/ #include <stdio.h> #include <stdlib.h> main() { char ch; printf("Do you want to shutdown your computer now (y/n)\n"); scanf("%c",&ch); if (ch == 'y' || ch == 'Y') system("C:\\WINDOWS\\System32\\shutdown -s -t 00"); return 0; } /*Please make this program exe via pressing 'F9' and it will create exe in c:\tc\bin\ program name.exe and then close c++ ide after that run exe file it will shutdown your computer.If u execute it via ctrl+F9 it will not work*/ Comments
Comments
Post a Comment