+ 2

Random Number Generator prob

cout << 10+(rand()%20); wont print between 10 to 20 what method to solve this??

11th Sep 2017, 12:57 PM
jayrn02
jayrn02 - avatar
2 Réponses
+ 2
do cout << 10 + (rand () % 11);
11th Sep 2017, 11:25 PM
Zeke Williams
Zeke Williams - avatar
- 1
check my code fun with true random nos, lots of comments and explanations to help you, I ll take a look on your code too wait
11th Sep 2017, 1:08 PM
Morpheus
Morpheus - avatar