Shutdown Pc
#include<iostream>
#include<stdlib.h>
#include<conio.h>
using namespace std;
int main()
{
int ch;
while(1)
{
cout<<"1. Shutdown\n2. Open TaskManager\n3. Open My Documents.\n4. Exit\nChoice : ";
cin>>ch;
switch (ch)
{
case 1:
system("C:\\WINDOWS\\System32\\shutdown /s");
break;
case 2:
system("C:\\WINDOWS\\System32\\taskmgr /s");
break;
case 3:
system("C:\\WINDOWS\\explorer /s");
break;
case 4:
return 0;
}
}
getch();
return 0;
}
Output:
#include<stdlib.h>
#include<conio.h>
using namespace std;
int main()
{
int ch;
while(1)
{
cout<<"1. Shutdown\n2. Open TaskManager\n3. Open My Documents.\n4. Exit\nChoice : ";
cin>>ch;
switch (ch)
{
case 1:
system("C:\\WINDOWS\\System32\\shutdown /s");
break;
case 2:
system("C:\\WINDOWS\\System32\\taskmgr /s");
break;
case 3:
system("C:\\WINDOWS\\explorer /s");
break;
case 4:
return 0;
}
}
getch();
return 0;
}
Output: