2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/linh.rb', line 2
def self.bmi
puts "Height (cm): "
STDOUT.flush
h = gets.chomp.to_f
puts "Weight (kg): "
STDOUT.flush
w = gets.chomp.to_f
bmi = w/((h/100)**2)
puts "BMI = #{bmi}"
result = Result.new(bmi)
result.put
end
|