Skip to content

Instantly share code, notes, and snippets.

@8bit-pixies
Created January 6, 2013 07:01
Show Gist options
  • Save 8bit-pixies/4465737 to your computer and use it in GitHub Desktop.
Save 8bit-pixies/4465737 to your computer and use it in GitHub Desktop.
chall115
def guess_rank
x=rand(100)+1
print "Guess number between 1-100: "
guess = x+1
while x!=guess
guess = gets.to_i
puts "lower" if x<guess
puts "higher" if x>guess
puts "correct" if x==guess
end
end
guess_rank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment