| delorie.com/archives/browse.cgi | search |
| From: | Erik Max Francis <max AT alcyone DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Random interger numbers |
| Date: | Tue, 24 Mar 1998 01:00:15 -0800 |
| Organization: | Alcyone Systems |
| Lines: | 17 |
| Message-ID: | <3517761F.5A64DC11@alcyone.com> |
| References: | <199803240715 DOT JAA31075 AT ankara DOT duzen DOT com DOT tr> |
| NNTP-Posting-Host: | charmaine.alcyone.com |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
S. M. Halloran wrote:
> Try this one out:
>
> return (rand() % n);
>
> I think it works almost every time.
Most of the time? One time out of every n, specifically.
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm:+37.20.07/-121.53.38
\
"I've got the fever for the / flavor of a cracker"
/ Ice Cube
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |