Determine the BMI Category
Use IF, ELSE-IF, and ELSE statements to find the body mass index (BMI) category based on user input.
Problem statement
Suppose you have the body mass index (BMI) of a person, and you want to find out if the person is underweight, healthy, overweight, or obese based on the following:
- obese: BMI is greater than or equal to 30
- overweight: BMI is greater than or equal to 25 but less than 30
- healthy: BMI is greater than or equal to 18.5 but less than 25
- underweight: BMI is less than 18.5
The main steps in problem-solving
Understand the problem
Go over the problem statement carefully and think about the desired output. The output should be one of the four ...