Alright. I want it so the following would happen, Heres a sample:
puts "what would you like to see?"
var = gets.chomp
if var == "z"
puts "this"
elsif var == "d"
puts "stack"
elsif var == "y"
puts "overflow"
else
puts "I don't understand that."
end
Currently it works fine up until I want to have the user redefine the 'var'. Currently all the loops just loop back the puts from the elsif - i want it to ask for the user input again, then print out the elsif to that.
For example:
User types in y
, the code would say overflow
, then return to line 1. Any help would be awesome.