Created
October 27, 2012 04:49
-
-
Save mayosuke/3962976 to your computer and use it in GitHub Desktop.
This file contains 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
# Run directly from github | |
# ruby -e "$(curl https://raw.github.com/gist/3962976/)" | |
randam = rand(10) | |
while true do | |
input = gets | |
number = input[0..-1].to_i | |
if number == randam | |
puts 'hit!' | |
break | |
elsif number > randam | |
puts 'big!' | |
else | |
puts 'small!' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment