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