Question #5: The BMI is often used to determine whether a person is overweight o
ID: 3593254 • Letter: Q
Question
Question #5: The BMI is often used to determine whether a person is overweight or underweight for their height. A person's BMI is calculated with the formula: BMI = weight * height? where weight is measured in pounds and height is measured in inches. Write a program that asks the user to enter weight and height and calculates and displays BMI. Program displays a message indicating whether the person has optimal weight, is underweight, or is overweight. A person's weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweightExplanation / Answer
in else if condition it should be:
else if (BMI>= 18.5 && BMI <=25)
Otherwise, it seems to be correct.
If you still face any issue, feels free to ask in comments. I will resolve your doubts there. For now, it seems to be completely fine other than the point I just made in the starting.