mercredi 22 avril 2015

srand() range not as intended c++

I am trying to generate random 9 digit numbers but for some reason my number is always 1000*****. I feel like my srand is good, but something else must be going on?

int SSN = (rand() % 899999999) + 100000000; 




Aucun commentaire:

Enregistrer un commentaire