Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Body Mass Index Calculator Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult

C++ Programming

Body Mass Index Calculator

Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women, 20 years old and above. The formula for calculating BMI is:

weightInPounds * 703

BMI = --------------------------------------------

heightInInches * heightInInches

Create a BMI calculator application that reads the users weight in pounds and height in inches, then calculates and displays on screen the users body mass index and his/her status (Underweight, Normal, Overweight or Obese). A range of normal adult weight for the height must be calculated and displayed as well.

If the users status is not Normal, calculate and display how many pounds needed to lose or gain so that the user will have Normal status.

Also, the application must display the following information from the Department of Health and Human Services/National Institutes of Health so the user can evaluate his/her BMI:

BMI VALUES

Underweight: less than 18.5

Normal: in the interval [18.5, 25.0]

Overweight: in the interval (25.0, 30.0]

Obese: greater than 30

Finally, your name as the programmer who wrote the program must be displayed on screen as well at the end.

You should figure yourself the formula for the adjusted weight, which should be derived from the above formula for BMI.

Note:

Comments at the top of your source file must include a brief description of the program, your name and the date of finishing.

For decimal value, set limit to 2 digits after the dot (i.e. 12.45, N0T 12.4 OR 12.4999).

2 point is deducted for each requirement that was not satisfied.

Input / Output Table of Data for Testing (Your program must pass the table)

Weight

Height

BMI

Adjusted Weight

Status

110

65

18.30

+ 1.18

Underweight

111.20

65

18.50

Normal

152

65

25.29

- 1.75

Overweight

150.25

65

25.00

Normal

180.30

65

30.00

- 30.05

Overweight

180.40

65

30.02

- 30.15

Obese

Sample BMI calculater made by the professor. It has to be similar to it. PLEASE HELP!

Enter the weight: 110 Enter height (inches): 65

With your weight of 110.00 pounds, and height of 65.00 inches, Your BMI is: 18.30 - You are Underweight. You need to gain 1.18 pounds to be in the Normal BMI range.

A range of normal adult weight for the height is: 111.18 - 150.25 lbs.

*** BMI VALUES *** (from the Department of Health and Human Services/National Institutes of Health) Underweight: less than 18.5 Normal: in the interval [18.5, 25.0] Overweight: in the interval (25.0, 30.0] Obese: greater than 30

Do you want to continue (y/n)? y

*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*-!-*

Enter weight (pounds): 150 Enter height (inches): 65

With your weight of 150.00 pounds, and height of 65.00 inches, Your BMI is: 24.96 - You are Normal.

A range of normal adult weight for the height is: 111.18 - 150.25 lbs.

*** BMI VALUES *** (from the Department of Health and Human Services/National Institutes of Health) Underweight: less than 18.5 Normal: in the interval [18.5, 25.0] Overweight: in the interval (25.0, 30.0] Obese: greater than 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

=+3 In what ways can an MNE improve or change its approach to IHRM?

Answered: 1 week ago