This code of C generates only multiples of 7 in Xcode:
#include <stdlib.h>
#include <time.h>
int main()
{
srand(time(NULL));
printf("%d", rand()%28);
}
It will also generate only multiples of 7 with multiples of 7 put in place of 28 (rand()%56
for example does the same thing). Any idea what's causing this problem? Thanks a lot for your help!