why doesn't ruby calculator work?(hepl pls) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why doesn't ruby calculator work?(hepl pls)

Code: print "Введити цифру: " input_number = gets.to_i print "Введите цифру " input_nubmer_two = gets.to_i print "Введите знак: " input_znak = gets case input_znak when '+' puts "#{input_number+input_nubmer_two}" when '-' puts "#{input_number-input_number_two}" when '/' puts "#{input_number/input_nubmer_two}" when '*' puts "#{input_number*input_nubmer_two}" end

13th Dec 2022, 3:49 PM
ILLARION MIKHAYLENKO
ILLARION MIKHAYLENKO - avatar
1 Answer
13th Dec 2022, 4:02 PM
Knight
Knight - avatar