Library/C Runtime/ranged rand

From Rosetta Code

int rangedRand(int min, int max) {

   return rand() % (max - min + 1) + min;

}