Skip to content

Instantly share code, notes, and snippets.

@Luomint
Created April 14, 2015 13:53
Show Gist options
  • Save Luomint/669962b3f25d068cb2cf to your computer and use it in GitHub Desktop.
Save Luomint/669962b3f25d068cb2cf to your computer and use it in GitHub Desktop.
#BMI weight in kg x / height in meters **2
puts "enter weight"
weight = gets.to_i
puts "enter height"
height = gets.to_i
bmi = (weight / (height ** 2))
puts "your bmi is #{bmi}"
@Luomint
Copy link
Author

Luomint commented Apr 14, 2015

Entered 1.89 then 70, then the (wrong) answer is 70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment