That code was for a range between 9 to 15, but I'm having problems with getting it into the negative range. The range I'm trying to get is -5 to 14.Code:srand(time(NULL)); range = (15-9) + 1; printf(" %d", rand() % range + 9);
Any help is appreciated, thank you in advance.