Hmm. All I know is that it gives the remainder of an operation. On other sites I checked their methods of doing this and it involved doing the same thing with rand() then adding a number that was to be the minimum...

rand() returns a random number in the range 0-RAND_MAX.rand() % 115 returns a number in the range 0-114. Note that 115 < RAND_MAX.85 + rand() % 115; This just adds 85 to above number so what you get is a number in the range 85-199.

Do you get these numbers by running the program many times? It probably has to do with the seed following the clock. If you run the program twice in the same second you will even get the same exact number. Generating many random numbers within the same run of the program will probably give numbers that appear to be more random.