Why am I the random value is always 0,
CodePudding user response:
Add a srand random number seed give it a tryCodePudding user response:
Your srand () function in where, if put into circulation,In addition, the rand () % 2 get random number range is 0, 1
CodePudding user response:
Srand ((unsigned) time (NULL));G.E [I] [j]=rand () % 2;
I also always is 0
CodePudding user response:
Srand me in what position is useless, circulation use both inside and outside