delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/29/06:42:22

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
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: <s9559v52q0s107 AT corp DOT supernews DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
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"
<wjurban AT tca DOT net> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019