Help! We're trapped in the computer, and the computer is trapped in 2008! Someone call the time police!
0 Members and 1 Guest are viewing this topic.
So then shouldn't it be:x = (rang()%20) + 5?
Quote from: AntiVirus on October 14, 2006, 10:20:10 pmSo then shouldn't it be:x = (rang()%20) + 5?rang()? Sorry, I think I missed a -1 in my formula. Sorry rand() % 20 returns a random number between 0 and 19, inclusive+5 makes it 5 to 24. The range is actually off by one.