[Solved] Random number generator gives consistent results [closed]
you should move the srand function to the begin of main. if you call this function twice in the same second you will get the same numbers from random() also you should change RandNum = 2 + (rand() % 2); to RandNum = 1 + (rand() % 2); rand() % 2 will result in 0 … Read more