Displaying 1 result from an estimated 1 matches for "givemenumb".
2008 Dec 04
2
Ruby fun with MegaMillions
...gamillions.com/. So far, after over
1.2 million tries, I still have not hit all the numbers from yesterday: 2,
17, 22, 32, 51, 35 (last one is the mega ball).
Fun little project that and I thought others would be interested. Let me
know if you have a cleaner implementation in mind.
--- code:
def giveMeNumbers
@a=[]
while @a.length <=4
@a << rand(56)+1
@a.uniq!
end
@mega = rand(46)+1
@outPut = @a.sort.push(@mega).join('', '')
end
100000.times do
puts giveMeNumbers
end
---
Sunny
ps. The next step is to calculate what my winnings would be based on the...