Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 86dcf662f8
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (12 sloc) 0.237 kb
answer = rand(10) + 1
puts "Guess a number: "
guess = gets.to_i
while (true)
if (guess == answer)
puts "Correct"
break
end
puts "Too high" if (guess > answer)
puts "Too low" if (guess < answer)
guess = gets.to_i
end
Jump to Line
Something went wrong with that request. Please try again.