16th Apr 2020, 10:01 AM
Icebreaker
Icebreaker - avatar
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".
25th Apr 2020, 12:26 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
- 3
Its working check it
16th Apr 2020, 5:05 PM
Akintunde Taofeek
Akintunde Taofeek - avatar