Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Homework 7 - How Healthy Are You? Problenm Write a program that calculates health information for people that computes both the Basal Metabolic Rate (BMR)

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Homework 7 - "How Healthy Are You?" Problenm Write a program that calculates health information for people that computes both the Basal Metabolic Rate (BMR) and the Body Mass Index (BMI). BMR and BMI are calculated fora specific person. Programming focus This program uses conditional statements, if, if-else-if, and switch. Description Prompt the user to enter his/her name, age, gender, weight in pounds, height in inches, and activity level. The program must validate this input based on the following criteria: Rules to Validate Input At least one character Input Name Gender M or F (upper or lower case Weight Height At least 100 pounds Between 60 to 84 inches, inclusively At least 18 years old Age Activity Level Between 1 to 5, inclusively Based on valid input, must calculate the user's BMR, BMI, and print some other useful information for the user. Equations The Harris-Benedict formula computes the BMR based on total body weight. The formula is based on the Metric system (kilograms and centimeters) that is calculated as follows: Men: BMR- 66(13.7* wt in kg) + (5 * ht in cm) - (6.8 * age in years) Women: BMR 655(9.6* wt in kg) +(1.8 * ht in cm) (4.7 * age in years) Using accurate conversion factors, convert from inches and pounds to the metric values for use in the above equations. Research these conversion formulas on the internet

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

More Books

Students explore these related Databases questions

Question

What is conservative approach ?

Answered: 3 weeks ago

Question

What are the basic financial decisions ?

Answered: 3 weeks ago