cvs.gedasymbols.org/archives/browse.cgi | search |
From: | aho450s AT nic DOT smsu DOT edu (Tony O'Bryan) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: random numbers error in DJGPP |
Date: | Sun, 02 Feb 1997 18:29:52 GMT |
Organization: | Southwest Missouri State University |
Lines: | 9 |
Message-ID: | <32f4dc71.16473293@ursa.smsu.edu> |
References: | <32F44A89 DOT 3142 AT ix DOT netcom DOT com> <01bc0d3a$8782ece0$5e0520ce AT d-moran> |
NNTP-Posting-Host: | forseti.i157.smsu.edu |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
On Sun, 02 Feb 1997 16:49:24 GMT, "Dennis Moran" <coolio AT coolio9 DOT com> wrote: >While I haven't started learning C yet (getting a book this afternoon!), in >QBasic the RND function returns a number between 0 and 1. So to get a >number between 1 and 100, try rand() * 100 + 1 . If rand() is the same as >RND then that'll work. rand() and RND do not work the same way. rand() returns a number from 0 to RAND_MAX according to the info file.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |