Question: 3.13 Lab 3C: Basic Metabolic Rate - expressions Overview Write a simple program using some arithmetic operations. Objectives The objectives of this lab are: to

 3.13 Lab 3C: Basic Metabolic Rate - expressions Overview Write a

3.13 Lab 3C: Basic Metabolic Rate - expressions Overview Write a simple program using some arithmetic operations. Objectives The objectives of this lab are: to be able to get input from the user correctly implement arithmetic operations output results. Description Create a program to estimate the Basic Metabolic Rate, or the amount of calories your body needs each day to sustain its basic vital functions. The equation used is the Mifflin-St Jeor Equation, using weight in pounds, height in inches, and age in years. (source: thecalculatorsite.com/artiles/health/bmr-formula.php) Men: BMR = 4.536(weight in lbs) + 15.88(height in inches) - 5(age) + 5 Women: BMR = 4.536(weight in lbs) + 15.88(height in inches) -5(age) - 161 Your program will prompt the user for age in years, weight in pounds, and height in inches, in that order. Your job is to output BMR for men and women, in that order. Your prompts should be as follows: Enter age (years): , Enter weight (pounds): Enter height (inches): . The prompts must be EXACTLY as written, including the colon () character with a space after it, or your test cases may fail. Since you are prompting the user for input, you should not enter anything into the (optional) input box below, but input your numbers after your prompts. You should assume that there will be no fractional parts of weight, height, or age entered (ie, no 18.5 years or 68.5 inches). Ex: If the input is: Enter age (years): 49 Enter weight (pounds): 155 Enter height (inches): 68 Then the output is: If a 49 year-old man weighs 155 pounds and is 68 inches tall, he needs 1542.92 calories per day for basic metabolic function. If a 49 year-old woman weighs 155 pounds and is 68 inches tall, she needs 1376.92 calories per day for basic metabolic function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!