I am looking for the proper way to do this in Ruby. I want to create an if/else statement that will keep looping until it finds the right answer. Example:
puts "Guess a number",prompt
$stdin.gets.chomp = x
if x == 5
puts "correct
else
# loop back to beginning and start over
end