and the program don't give unique numbers some numbers are repeatable
That's how randomness works..If you want no repetitions you have to know which numbers were already generated.
suggestion 1: store every generated number in an array. Then, when you need another number, call rand(), check if it is in array. If it is not, add it and return. If it is, repeat the process.
I'm generally against using system-dependent solutions, but for pausing the console, you can use either Windows' Sleep(milliseconds); or UNIX compilant systems' usleep(milliseconds); to create the delay. Or you can use both!
1 2 3 4 5 6 7 8 9 10
#if defined(_WIN32)
Sleep(10000); //Requires <windows.h>
#elif defined(__unix) || defined(__linux) || defined(__APPLE__)
usleep(10000); //Requires <unistd.h>
#else
clock_t endwait; //Requires <ctime>
endwait = clock () + 10 * CLOCKS_PER_SEC ;
//clock() returns the current number of seconds since the program started.
while (clock() < endwait) {} //This is a waste of resources.
#endif
EDIT: Fine, I also gave the ctime solution.
EDIT2: Actually, I'm not sure if usleep() is required in POSIX specifications. To be sure, I changed the predefs.