Random number generators!

I'm writing a program for a ferry that has to unload and load vehicles between two ports. We have to use the random number generator function in our class to generate two different numbers...Port A number between 75-100 and Port B number between 100-150. When I return both numbers I'm getting numbers like 16 and 28. Which are clearly way smaller numbers than I need. Someone please help fix this problem!
The C PRNG works like this.

You call srand() to seed the PRNG. Then you call rand() to return the next number in the sequence. It returns a number between 0 and RAND_MAX.

http://pubs.opengroup.org/onlinepubs/007908799/xsh/rand.html
Topic archived. No new replies allowed.