Tuesday, 3 February 2015

Sleep function in C++

Structure of the Problem Requirements 

The sleep function is used to suspend the execution of the program for sometime. The value which passed to the sleep function arguments is in milliseconds. This function exist in windows.h library in C++.

Source Code

#include<iostream>
#include<windows.h>
using namespace std;
int main ()
{
cout<<" \n \n \t \t \t \t WELCOME TO LEP \n ";
Sleep(2000);
cout<<" 1. ";
Sleep(2000);
cout<<" C++ \n ";
cout<<" 2. ";
Sleep(2000);
cout<<" Java \n ";
cout<<" 3. ";
Sleep(2000);
cout<<" Linux \n ";
cout<<" 4. ";
Sleep(2000);
cout<<" Android \n ";
cout<<"\t \t \t \t Thank u ! \n ";
}

Output of the Program

Sleep function in C++

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment