I am trying to ask a question and give back something depending on the answer. Here is my code:
X = 1
Y = 2
puts "x = 1 and y = 2"
puts "what is x + y?"
user_input = gets.chomp
if user_input == 3
print "Correct"
elsif user_input != 3
print "Wrong"
end
It asks what 1+2 is, and if you input 3, it prints wrong, but if you input something else, it still replies back with wrong.