ruby - Can't output the result in after if -


i want make simple program returns weight quantity choosing units. when run program runs no problems , asks 2 questions in if doesn't return value

here code:

puts "what starting weight , ratio unit? 1:kg.m/h 2:gm.m/s 3:mm.m/s"  inputing_unit = gets.chomp  puts "what ending weight , ratio unit? 1:kg.m/h 2:gm.m/s 3:mm.m/s"  ending_unit = gets.chomp  if inputing_unit == 1 , ending_unit == 1   puts "what weight?"   input_weight = gets.chomp.to_i   puts "what ratio?"   input_ratio = gets.chomp.to_i   puts "your moving value #{input weight * input_ratio}" end 

as can see screenshot in beginning of description on pre-last line puts statement there typo #{input weight * input_ratio}. should change ...#{input weight... ...#{input_weight... (with dash).


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -