Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. hits = 0 ; total = 0
  2. (1..6).each do |d1|
  3. (1..6).each do |d2|
  4. (1..6).each do |d3|
  5. (1..6).each do |d4|
  6. (1..6).each do |d5|
  7. (1..6).each do |d6|
  8. hits+=1 if d1+d2+d3+d4+d5+d6 >= dif
  9. total += 1
  10. end
  11. end
  12. end
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment