From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Random numbers with rand() and srand() Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: <67a59sc9r0t9bl7qln4ut7nj01bed4mio7@4ax.com> References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 18 X-Trace: /wLwTfQJndWqA196c/qHFQ3b91+gzm04FsWlk+ypMR/eWejuDV6hqkiOuULn3cx0Mr2EphrNS6uQ!Of4k/LDwrsvCFl2UGzfDVcBOJIYz1nl9ikZhNlTJkELwu/idsshvG8r9pIc0FBMBgAo3L37bsA== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sat, 29 Jan 2000 08:49:34 GMT Distribution: world Date: Sat, 29 Jan 2000 08:49:34 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 29 Jan 2000 01:20:30 -0600, "William J. Urban II" wrote: >die = ((rand%6)+1); >die = ((rand%6)+1); >die = ((rand%6)+1); >die = ((rand%6)+1); What are you coding? Some pascal/C hybrid? die = ((rand() % 6) + 1); ^^ -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html