lundi 20 août 2018

random number from 1-6 in C++ gives me only the number 6?

I tried to generate a random number, but the only number that comes out is 6.

random = (rand() % 6) + 1;




Aucun commentaire:

Enregistrer un commentaire