0
Why isnt this working?
2 Réponses
0
First of all based on SoloLearn input behavior the operator variable ends with a line break by just using gets. Second issue is that operations will not work on the variables as they are strings, convert your inputs via to_f (or to_i).
num1 = gets.to_f
operator = gets.chomp
num2 = gets.to_f
PS: I guess you are missing an else before "tryagain = true".
- 3
Its working check it