How to get my program to pause briefly before displaying a message?

In this theoretical console application:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

using namespace std;

int main
{
int number;
cout << "enter in a number";
cin  >> number;
cout << "hmmm...";
cout << "that number plus 5 is " << number+5 <<".";
    system("PAUSE");
    return EXIT_SUCCESS;
}


Would there be any way to make the program pause for about a second after the
cout <<"hmmm...";
to give the humerous illusion the computer has to think about it
instead of just instantly moving on to the next line?
Yes. It's called Sleep().
http://cplusplus.com/forum/beginner/20837/

-Albatross
Why does every newcomer on this board insist on using system calls? It's a horrible practice to get into...
Because it is distressingly endemic to teach new programmers said horrors.
Topic archived. No new replies allowed.