Random number generator? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Forum: Plug-Ins (/forumdisplay.php?fid=28) +------ Thread: Random number generator? (/showthread.php?tid=29043) Random number generator? by Phrive on 07-23-2004 at 01:40 PM has any1 got a sourse code for a random number generator that generates one number bettween 1 and 10 i posted it in tech tlk but no reply plz i need it badly RE: Random number generator? by KeyStorm on 07-23-2004 at 01:43 PM It can't be so difficult, which language? RE: Random number generator? by Phrive on 07-23-2004 at 01:44 PM i have done it b4 and i was tryin 2 remeber it but i cudnt get it to work properly c++ RE: Random number generator? by Millenium_edition on 07-23-2004 at 01:44 PM
in vb it's code: c++? damn. sorry RE: Random number generator? by KeyStorm on 07-23-2004 at 01:50 PM
randInt = ( rand() % 10 ) + 1; RE: Random number generator? by Phrive on 07-23-2004 at 01:52 PM kk ill try it !! RE: Random number generator? by matty on 07-23-2004 at 02:18 PM
http://www.robertjacobs.fsnet.co.uk/random.htm RE: Random number generator? by Phrive on 07-23-2004 at 02:19 PM
cheers matty im almost there and thats hlped alot cheers i did search but i cudnt find anything RE: Random number generator? by dotNorma on 07-23-2004 at 05:08 PM
Its all over google in any language code: (Visual Basics) code:(C++) Notice the VB one makes sense while the C++ one just seems like a bunch of random jabber RE: Random number generator? by RaceProUK on 07-24-2004 at 09:37 AM You don't get truly random numbers anyway, just pseudorandom ones. There are iterative formulae that oscillate seemingly wildly between 0 and 1 that are used for random number generators, which is why a lot of them have seeds. RE: RE: Random number generator? by LunarCrisis on 09-06-2004 at 04:41 AM
quote: Actually, since the low order bits are usually less random (using rand()) then the higher order bits, this would be more random: randInt = (int)( rand() / (RAND_MAX + 1) * 10 + 1 ) the method previously posted uses only the lowest few bits (the least random), while this method relies mostly on the high order bits. Yes, it's picky RE: Random number generator? by CookieRevised on 09-06-2004 at 01:05 PM
maybe you can use the various dice roller plugins. They do nothing more then generating a random number (also between 1 and 10): |