Question

Write a modular program that calculates and displays a person’s body mass index (BMI). The BMI...

Write a modular program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula

BMI = weight * 703/height2

Where weight is measured in pounds and height is measured in inches. The program should ask the user to enter his or her weight and height and then display the user’s BMI. The program should also display a message indicating whether the person has optimal weight, is underweight, or is overweight. A person’s weight is considered optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is underweight. If the BMI value is greater than 25, then the person isoverweight.

How would a Flowchart look for this?

Homework Answers

Answer #1

#include <iostream>

using namespace std;

int main() {

double weight,height,bmi;

cout<<"Enter weight(in pounds) and height(in inches): ";

cin>>weight>>height;

//calculate bmi

bmi=weight*(703/(height*height));

if(bmi>=18.5 && bmi<25)

cout<<"Optimal Weight"<<endl;

else if(bmi<18.5)

cout<<"Underweight"<<endl;

else

cout<<"Overweight"<<endl;

}

Output

Flowchart

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The Body Mass Index (BMI) is a calculation used to categorize whether a person’s weight is...
The Body Mass Index (BMI) is a calculation used to categorize whether a person’s weight is at a healthy weight for a given height. The formula is as follows:                 bmi = kilograms / (meters2)                 where kilograms = person’s weight in kilograms, meters = person’s height in meters BMI is then categorized as follows: Classification BMI Range Underweight Less than 18.5 Normal 18.5 or more, but less than 25.0 Overweight 25.0 or more, but less than 30.0 Obese 30.0...
The body mass index (BMI) of a person is the person’s weight divided by the square...
The body mass index (BMI) of a person is the person’s weight divided by the square of his or her height. It is an indirect measure of the person’s body fat and an indicator of obesity. Results from surveys conducted by the Centers for Disease Control and Prevention (CDC) showed that the estimated mean BMI for US adults increased from 25.0 in the 1960–1962 period to 28.1 in the 1999–2002 period. [Source: Ogden, C., et al. (2004). Mean body weight,...
Please write it in c# program please and if possible no arrays only loops Loop Introduction...
Please write it in c# program please and if possible no arrays only loops Loop Introduction Assignment Using the conditions below, write one program that calculates a person’s BMI. Your main() function will call functions 1, 2, and 3. Your program will contain three functions: Function #1: Will ask the user for their weight in pounds and their height in inches.   Your function will convert the weight and height into Body Mass Index (BMI). The formula for converting weight into...
Write a Java program that asks the user to enter a person’s age. Then the program...
Write a Java program that asks the user to enter a person’s age. Then the program should display text indicating whether the person is an infant, a toddler, a child, a teenager, an adult, or a senior. It should display it just like this: “This person’s age category: x”, where x is the person’s age category based on the following guidelines: If less than 1 year old, the person is an infant. If at least 1 year old but younger...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT