From: Jeff Wood Date: 2005-12-08T07:11:00+09:00 Subject: Re: Newer to Ruby ------=_Part_6069_7778918.1133993453857 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline heh. sorry d.black didn't see you'd already posted it. j. On 12/7/05, Jeff Wood wrote: > > number =3D ( rand( 599999999 ) + 100000000 ) > > ... should always generate a 9 digit number. > > j. > > On 12/7/05, Kwhamec Rojas < bedeviledme@fastmail.fm> wrote: > > > > Hi. I am new to Ruby and new to programming altogether, but I am reall= y > > > > trying to learn as fast as I can. > > > > So here's my problem: I need to be able to generate a random nine digit > > number. The first number cannot be 9,8 or 7. > > > > I am using Watir to test a site, but I will need to randomly generate > > this number or the test will be rejected. Thank you very much for > > whatever help you can give me. > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood ------=_Part_6069_7778918.1133993453857--