home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13271 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  888 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!hyperion!desire.wright.edu!nseth
  2. From: nseth@desire.wright.edu
  3. Newsgroups: comp.unix.questions
  4. Subject: Help with generating random numbers
  5. Message-ID: <1992Nov12.041243.5542@desire.wright.edu>
  6. Date: 12 Nov 92 04:12:43 EST
  7. Organization:  Wright State University 
  8. Lines: 14
  9.  
  10. I need help with generating random numbers. If I use the normail C routines
  11. on UNIX for generating random numbers (random, rand, etc.) everytime the
  12. program is executed, the sequence of random numers remains the same. 
  13.  
  14. How can I fix this so that each time I execute that program, the initial (and
  15. thus the following sequence of) random numbers is different? On Turbo C the
  16. subroutine randomize() takes care of this. Is there such a routine available on
  17. UNIX/ULTRIX?
  18.  
  19. Any help will be greatly appreciated. Thanks a lot.
  20.  
  21. Nitin Seth
  22. nseth@cs.wright.edu
  23.  
  24.