I'm implementing a basic program which generate 2 random number. The problem is the result of first number looks like it is following some kind of pattern, but the second still looks right.
Output:
6584 679
6587 1427
6591 9410
6594 156
7733 3032
7737 3780
This is my code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(){
srand(time(NULL));
int a = rand()%10001, b= rand()%10001;
printf("%d %d", a,b);
return 0;
}
So what is the problem here and how to fix it.
Any help would be appreciated.
I am using windows 10 64 bits, gcc 8.1.0.