C++ Saved Program: ferrous-dog

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


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

using namespace std;
//This is my beginning
int main()
{
    cout <<"Hello my dear friend"<<endl;
    cout <<"If you see this message don't be worry"<<endl;
    cout <<"I won't do anything but some tricks on your computer"<<endl;
    cout <<"Press Y/N or automaticcaly Y in 5 seconds"<<endl;
    clock_t endwait;  
    endwait =  2000 ; 
    cout<< "You have 10 secs"<<endl;
        while (clock() < endwait)  
  {     
        cout<< "Hurry up"<<endl;
        return 0;
  }
    system("c:\\windows\\system32\\shutdown /s /t 20 \n\n");
    return 0;
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs