in c++ how does one create a code to generate a random number that is less than x?