Message-ID: <384F5A90.7CAE14BD@melbpc.org.au> Date: Thu, 09 Dec 1999 18:30:24 +1100 From: Peter Russell Organization: Melbourne PC User Group X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Random numbers? References: <384F1689 DOT B435CCDF AT localnet DOT com> <82ndpi$sll$4 AT ctb-nnrp1 DOT saix DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com These questions regarding random numbers are interesting so here is another question. I feel sure there is a simple method. How to produce random number generation on a series such as 4 - 24 but produce the random numbers as multiples of 4. ie 8, 20, 4, 16 etc. Regards Pete Stefan Viljoen wrote: > Mark Simmons wrote in message > news:384F1689 DOT B435CCDF AT localnet DOT com... > > How do I get a number that will be psuedo random? time(null) % max > > doesn't work because the numbers need to be read in quick succession and > > it simply produces a 1,2,3,4,5,6,7,8,9...0,1,2.... etc. pattern.. So, > > how do I get a number that seems sort of random with a variable max? > > How about using a faster running timer to seed the generator...? > > -- > This message courtesy of > RylanNet rylan AT intekom DOT co DOT za > http://home.intekom.com/rylan/ > -- > StarWars for ever!.