Created
July 30, 2012 15:38
-
-
Save spangenberg/3207885 to your computer and use it in GitHub Desktop.
RANDOM BRAIN!FUCK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| times = ARGV[0].to_i | |
| tries = ARGV[1].to_i | |
| times.times do | |
| sum = 0 | |
| tries.times do | |
| sum = sum + rand(1..6) | |
| end | |
| avg = sum / tries | |
| puts avg | |
| exit if avg >= 4.0 || avg <= 2.0 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment