delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/30/10:02:22

To: djgpp AT delorie DOT com
Subject: Randomization of Numbers with rand() and stdlib.h
Message-ID: <19960930.074610.11630.0.wilbur3@juno.com>
From: wilbur3 AT juno DOT com (Will C Stockwell)
Date: Mon, 30 Sep 1996 09:41:17 EDT

   I am trying to randomize numbers between 0 and 15. But when I use the
stdlib.h file and the rand() function. I get the same number every time.
It's something like 25049302. Really long. I have set the RAND_MAX macro
value to 15 with a define statement but I still get the 25049302. Is
their another way to get random numbers? With time as a random factor
maybe? Thanks.

Will Stockwell
mailto:wilbur3 AT juno DOT com
Wilbur's World-http://www.geocities.com/SiliconValley/Park/5981/

- Raw text -


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