#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Unhappy Generaterandom numbers with equal probability


    Dear all,
    I wanna to generate numbers -in range- with equal probability.
    So I have minimum value and maximum value and number of generate numbers and return array of numbers, like this:

    Code:
    public long[] doGenerate(int min, int max, int total)
    {
      return ret[];
    }
    Thank you.
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    348
    Can you explain the problem you are having with your program? What have you tried and what happened when you compiled and executed it?
    Are you going to write your own random number generator or use one of the java classes?

IMN logo majestic logo threadwatch logo seochat tools logo