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
2 Answers