srand(int) to seed the pseudo random generator, seeding with time(0) is usually the best
rand() to get a random number, mod (%) the result to create you range, and + whatever your lower bound is...
Here when I say range I mean upper bound - lower bound
1 2
srand(time(0));
(rand() % 10) + 5; //Random number between 5 and 15 inclusively