From: Bryan Weatherly Date: 2007-01-07T03:41:50+09:00 Subject: Re: HOW-TO produce random numbers within a range? ------=_Part_40189_5202092.1168108906806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/6/07, Ruby N00bie wrote: > > I have learnt that rand(100) produces random numbers from 0 to 99 but i > need to know how to set a minimum for the random number. > > Your help would be greatly appreciated. > > Thanks in advance, tckl. > > -- > Just add the minimum value to whatever number you generate. For example, if you wanted to generate a random number between 0 and 99 with a minimum value of 20: rand(80) + 20 ------=_Part_40189_5202092.1168108906806--