A simple way to generate a random number in C++ is by using the rand()
method.
Here's an application that prints out 10 random numbers from a user specified range:
int randomNumber(const int min, const int max) {
const int range = max - min + 1;
return rand() % range + min;
}