dimanche 28 février 2016

Why does rand() % 50 get a random number between 0 and 50?

This code:

cout << rand() % 50 << endl;

generates a random number between 0 and 50. Why is this?




Aucun commentaire:

Enregistrer un commentaire