Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/a15745105_ichinoki.rb
Instance Method Summary collapse
Instance Method Details
#bmi_cal_ichinoki(kg, cm) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/a15745105_ichinoki.rb', line 5 def bmi_cal_ichinoki(kg, cm) if kg <= 0 || cm <= 0 puts "Please input your weight and height" else bim = kg.to_f / (cm.to_f * 0.01) ** 2 puts "Your BMI is #{bim.round(1)}" end rescue ArgumentError => ex puts "Not input Sitrng!!" end |