Josh Cheek wrote: > > # How about something like: > > max = 100 > > low , high = [ rand(max) , rand(max) ].sort > > difference = high - low > > middle = low + rand(difference).to_i #to_i for if low and high have > same > value > > puts "low = #{low}" > puts "middle = #{middle}" > puts "high = #{high}" The problem with your solution is that low and high can be the same number. -- Posted via http://www.ruby-forum.com/.