Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME WITH ANSWER, I AM NOT SURE WHAT AM I DOING WRONG. USE C++ THANK YOU A Program to Calculate Body Mass Index

PLEASE HELP ME WITH ANSWER, I AM NOT SURE WHAT AM I DOING WRONG. USE C++

THANK YOU

A Program to Calculate Body Mass Index (BMI)

You now have all the ninja power to code this program. Be patient and detail-oriented. Code part by part, incrementally. Keep compiling, debugging, and moving on only when the program works as expected. Save a working version if needed.

Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women.

Part 1: Menu prompt

Prompt the user to enter his/her your weight and height using US-standard or metric measures You may design your menu something like:

Please enter 1 if you want to use US standard measures (feet, inches, pounds).

Please enter 2 if you want to use International metric measures (centimeters, kilograms)

Part 2: User input for weight and height

If the user enters 1 (standard), you will prompt the user:

Please enter #feet and #inches for height: //Note, two variables: feet and inches

Please enter #pounds (lbs):

If the user enters 2 (metric), you will prompt the user:

Please enter #meters for height:

Please enter #kilograms for weight:

Part 3: Calculate BMI

For US standard measures, formula is:

(weight (lb) / height (in) /height(in)) x 703

For metric measures, the formula is:

(weight (kg) / height (m) / height (m))

Part 4: Calculate BMI category based on the following table (Extra Credit: 1 point)

BMI categories:

Underweight = <18.5

Normal weight = 18.524.9

Overweight = 2529.9

Obesity = BMI of 30 or greater

Part 5: report

Present on screen the following information:

Your weight is: xxx kg (or xxx lbs)

Your height is: xxx cm (or xxx foot xxx inches)

Your BMI is: xxx

You are: Underweight (or Normal weight, or Overweight, or Obesity)

Programming hints, guidelines:

1. You may declare the following variables:

int feet, inches,

double lbs, meters, kg, bmi;

2. You may use if block to handle US standard measures, and else block to process metric measures. Part 3 can be programmed in the same block as Part2.

3. You may process bmi value using if..else if..else if..else.. statement.

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

=+1 Where are the best places in the world to live (and work)?

Answered: 1 week ago

Question

=+Are you interested in working on global teams?

Answered: 1 week ago

Question

=+Do you want to work from home?

Answered: 1 week ago