C has a mediocre RNG called rand() you can use. It'll be fine for something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <cstdlib> // for rand/srand
#include <ctime> // for time
int main()
{
srand((unsigned)time(0)); // seed RNG at startup -- if you don't do this
// the "random" numbers will be predictable.
// Using time to seed is typical
// to get a random number between [0-999]
int num = rand() % 1000;
// or if you want [1-1000] instead:
num = (rand() % 1000) + 1;
return 0;
}