Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main = print $
- mybmicalculator 185 75
- mybmicalculator :: (RealFloat a) => a -> a -> String
- mybmicalculator weightinpound heightininches
- | bmivalue <= 18.5 = "You're underweight"
- | bmivalue <= 25.0 = "You're supposedly normal"
- | bmivalue <= 30.0 = "You're overweight"
- | otherwise = "You're obese"
- where bmivalue = weightinpound / (heightininches) ^ 2 * 703
Add Comment
Please, Sign In to add comment