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

Body Mass Index (BMI) is a measure of health that is based on a person’s weight

ID: 3674055 • Letter: B

Question

Body Mass Index (BMI) is a measure of health that is based on a person’s weight and height. It is calculated by dividing a person’s weight (in kilograms) by the square of a person’s height (in meters). Write a program that prompts the user to enter a weight (in pounds) and a height (in inches) and then displays the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters. The program should also display the following BMI information from the Department of Health & Human Services/National Institutes of Health so a user can evaluate his/her BMI: Underweight: less than 18.5 Normal: 18.5 – 24.9 Overweight: 25 – 29.9 Obese: 30 or greater

Explanation / Answer

#include<iostream>

using namespace std;

int main()

{

int height=0;

int weight=0;

int BMI=0;

cout<<"Enter your height in inches:";cin>>height;

cout<<"Enter your weight in pounds:";cin>>weight;

cout<<end1;

BMI=(Weight*703)/(height*height);

cout<<"Your BMI is:"<<BMI<<end1<<end1;

cout<<How to read your BMI:"<<end1;

cout<<"Below 18.5:UnderWeight"<<end1;

cout<<25.0-29.9:Average"<<end1;

cout<<"30 and above:obese"<<end1<<end1;

system("pause");

}