Thread: rnadom number

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    1

    rnadom number

    Hi, could some tell me a way to use random() to get evenlydistributed numbers between 2^-5 and 1. Thanks

    HKIM

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    Try th FAQ : http://www.cprogramming.com/boardfaq.html#random

    also if you want to find info on a specific subject try using the search. I suspect if you type random in the search field, you'll get a lot of results.
    http://www.cprogramming.com/cboard/search.php?s=
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  3. #3
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Just use addition with the rand() function. That'll work for a range.
    1978 Silver Anniversary Corvette

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    11

    random()

    hi there,
    study yourself the fundas of random numbers and make function yourself...
    Feedback is the breakfast of champions...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help getting program print out the digit in words
    By cosmiccomputing in forum C Programming
    Replies: 26
    Last Post: 04-24-2008, 08:28 AM
  2. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 09:27 AM
  3. Calculating next prime number
    By anilemon in forum C Programming
    Replies: 8
    Last Post: 04-17-2006, 10:38 AM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04:25 AM
  5. parsing a number
    By juancardenas in forum C Programming
    Replies: 1
    Last Post: 02-19-2003, 01:10 PM