number = rand(1..10)

puts 

loop do
  begin
    user_number = Integer(gets)
    if user_number == number
      puts 
      break
    elsif user_number > number  
      puts 
    else
      puts 
    end
  rescue ArgumentError
    puts 
  end
end