+ 3

Why it keeps putting out 41 for one?

I expect it to put out different number each time I run the program.

26th Dec 2016, 12:18 AM
Wilson Bol
Wilson Bol - avatar
2 Réponses
+ 4
Share the code so we can check what's happening
26th Dec 2016, 12:25 AM
Nahuel
Nahuel - avatar
+ 1
rand() is pseudo-random. You need to seed the generator. (srand)
26th Dec 2016, 1:46 AM
Madison
Madison - avatar