-
-
Save McLarenCollege/4c56665aabfb976c2e158dc301bb1caa to your computer and use it in GitHub Desktop.
BMI Calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Write function bmi that takes two parameters , the weight and the height and calculates body mass index bmi. | |
bmi is calculate as (weight divided by square of height) | |
Note: Don't use Math.pow() to calculate square. | |
if bmi <= 18.5 return "Underweight" | |
if bmi <= 25.0 return "Normal" | |
if bmi <= 30.0 return "Overweight" | |
if bmi > 30 return "Obese" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment