Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started