Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question #5: The BMI is often used to determine whether a person is overweight o

ID: 3593251 • 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 overweight

Explanation / Answer

The program seems fine. Any specific reason for taking BMI,weight and height to be long double. double will also do.