Guest User

Untitled

a guest
Dec 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. main = print $
  2. mybmicalculator 185 75
  3. mybmicalculator :: (RealFloat a) => a -> a -> String
  4. mybmicalculator weightinpound heightininches
  5. | bmivalue <= 18.5 = "You're underweight"
  6. | bmivalue <= 25.0 = "You're supposedly normal"
  7. | bmivalue <= 30.0 = "You're overweight"
  8. | otherwise = "You're obese"
  9. where bmivalue = weightinpound / (heightininches) ^ 2 * 703
Add Comment
Please, Sign In to add comment