Message-ID: <19990716153443.74661.qmail@hotmail.com> X-Originating-IP: [207.172.36.189] From: "Dr. |V|0lybd3nu|V|" To: djgpp AT delorie DOT com Subject: Re: ---Random question--- Date: Fri, 16 Jul 1999 11:34:43 EDT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Reply-To: djgpp AT delorie DOT com >From: "Börje Granberg" >Subject: ---Random question--- >Date: Fri, 16 Jul 1999 15:55:44 +0200 > >I know there are commands like rand() and random() but how do I get a >random >number between 1 and 100? DJGPP's version of random() produces a number between 0 and RAND_MAX. To limit the range of random() to produce numbers 1-100, just use (random()%100) + 1; Kirill Orlov _______________________________________________________________ Get Free Email and Do More On The Web. Visit http://www.msn.com