0
when generating randomly 2 numbers in c++ between 1 and 3 what i have to do if i don't want the first nb to be == second nb
3 Antworten
+ 1
You can generate the first number, then put the random number generator in a loop, which runs until the generated number is not the same with the first.
+ 1
Use a "do...while" loop.
+ 1
it worked thanks