C++ Program To Shutdown Computer

#include<iostream>
#include<conio.h>


using namespace std;

void main()
{
char ch;

cout<<"Do yo want to shutdown your computer?(y/n)";
cin>>ch;

if(ch=='y'||ch=='Y')
{
system("C:\\WINDOWS\\System64\\shutdown/s");
}
else
{
exit (0);
}




getch();
}

No comments:

Post a Comment