Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hits = 0 ; total = 0
- (1..6).each do |d1|
- (1..6).each do |d2|
- (1..6).each do |d3|
- (1..6).each do |d4|
- (1..6).each do |d5|
- (1..6).each do |d6|
- hits+=1 if d1+d2+d3+d4+d5+d6 >= dif
- total += 1
- end
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment