Skip to content

Instantly share code, notes, and snippets.

@spangenberg
Created July 30, 2012 15:38
Show Gist options
  • Select an option

  • Save spangenberg/3207885 to your computer and use it in GitHub Desktop.

Select an option

Save spangenberg/3207885 to your computer and use it in GitHub Desktop.
RANDOM BRAIN!FUCK
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