Welcome!
Right now, your program is invalid, actually. You attempt to use x before initializing it, presumably to 0. C++ requires all variables be properly initialized (if read before being written to), otherwise it's "undefined behavior" (most likely junk values, crashes, etc.)
First, initialize your x to be 0:
int x = 0;
Then, you can change the 4000 to be a 10.
[You can also use a for loop, see:
http://www.cplusplus.com/doc/tutorial/control/ loops section]
Inside the if (x == 5) block, add a
return 1;
(the actual value doesn't matter). This will exit the program, like the prompt tells you to do.
After the while loop, print the "wow, you're more patient..." text.
_____________________________________
Also, pay attention to proper indenting of your code. Your if block (lines 9-11) is within your while block (lines 6-12), so you should indent lines 9-11 one more level over.