I am tyrying to get SRAND to generate a random number between 50 and 100.
My code works but generates 1-100, what do I have to do to the %100 to get it to go between 50 and 100.
Here is the code:
include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
int i;
time_t t;
srand((unsigned) time(&t));
for(i=0; i<10; i++)
printf("%d\n", rand() % 100);
return 0;
}