mercredi 28 octobre 2020

Why does rand()%10+1 give me a number between 1-10?

Im fairly new to programming

So i was actually trying to figure something out

Why does rand()%10+1 give us a number between 1-10 whereas 32767%10 is actually 7?




Aucun commentaire:

Enregistrer un commentaire