What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [C help] how to...

[C help] how to...
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: [C help] how to...
code:
int <result> = rand() % <out-of>;
The rand() function returns a number from 0 to MAX_INT (32,767 I think). By using the modulo division operator %, you can replace <out-of> with an integer e.g. use 10 to get a random number from 0-9 inclusive.
[Image: spartaafk.png]
06-11-2004 10:09 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[C help] how to... - by crank on 06-10-2004 at 02:32 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 10:09 AM
RE: [C help] how to... - by crank on 06-11-2004 at 01:26 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 01:30 PM
RE: [C help] how to... - by crank on 06-11-2004 at 01:38 PM
RE: [C help] how to... - by RaceProUK on 06-11-2004 at 01:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On