This is a very simple task my friend....

Somewhere in your program perferibly at the beginning have
srand(clock());

to set the random seed.

and to assign a variable to be a random number...