Created
December 10, 2018 21:13
-
-
Save o0pmitev/39cfa36d62b6e978e33acf7b9a58d77d to your computer and use it in GitHub Desktop.
js training
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
// bmiCalculator | |
console.log("Calcilate your Body Mass Index(BMI)"); | |
console.log("************************************"); | |
let weightKg = 67; | |
let heightCm = 177; | |
//bmi calculation | |
const bmi = weightKg/((heightCm/100)*(heightCm/100)); | |
console.log(`Your BMI is ${bmi}`) | |
const summ = () => { | |
if(bmi < 18.5){ | |
console.log('Underweight'); | |
} else if(bmi < 25){ | |
console.log('Perfect') | |
} else if(bmi <= 30){ | |
console.log('Overweight'); | |
} else { | |
console.log('Obese'); | |
} | |
} | |
summ(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment