Learnem Educational
May 18, 2012, 01:02:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Random Numbers in C  (Read 1378 times)
Anonymous
Guest
« on: August 31, 2002, 08:43:19 PM »

Is it possible to get a random number generated in C?
If you know how, could you please e-mail me or post a reply? My e-mail is psycho_mantis246@hotmail.com
« Last Edit: January 01, 1970, 12:00:00 AM by Anonymous » Logged
Mr. Cool
Newbie
*
Posts: 11


View Profile
« Reply #1 on: August 31, 2002, 11:06:40 PM »

Yes!
Use the function rand().  This produces the same random number over and over again.  To produce random random numbers use function srand().

Hope this helps!
 :wink:
« Last Edit: January 01, 1970, 12:00:00 AM by Mr. Cool » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!