Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cs-142:random-values [2016/10/07 17:08]
kseppi
cs-142:random-values [2016/10/07 18:30] (current)
kseppi
Line 39: Line 39:
     for (int i = 0; i < NUMBER_OF_TESTS;​ i++) {     for (int i = 0; i < NUMBER_OF_TESTS;​ i++) {
         // Random roll of a 6 sided die         // Random roll of a 6 sided die
-        dieFace = rand() % MAX_FACE;+        dieFace = 1 + rand() % MAX_FACE;
         cout << dieFace << endl;         cout << dieFace << endl;
     }     }
cs-142/random-values.txt ยท Last modified: 2016/10/07 18:30 by kseppi
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0