Date: Fri, 10 Nov 2000 12:11:36 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "tritesnikov" Message-Id: <7263-Fri10Nov2000121136+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: (tritesnikov AT hotmail DOT com) Subject: Re: random number generator References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "tritesnikov" > Newsgroups: comp.os.msdos.djgpp > Date: Fri, 10 Nov 2000 01:41:58 GMT > > srand(time(0)); > a = rand() % 5; > > This is more or less the standard way of doing a simple random number. FYI, section 22.23 of the DJGPP FAQ list explains why the above is a bad idea, and how to do this better.