[SOLVED] Lab 2: Chocolate

15.00 $

Programming resource
, Digital learning resource
Categories: ,
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (2 votes)

Lab 2: Chocolate
1 Assignment
The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The formula for the calories needed for a woman
to maintain her weight is:1 BMR = 655:1 + (4:35  weight) + (4:7  height) 􀀀 (4:7  age)
The formula for the calories needed for a man to maintain his weight is BMR = 66 + (6:2  weight) + (12:7  height) 􀀀 (6:76  age)
A typical chocolate bar contains 214 calories. Write a program that allows the user to input his or her weight in pounds, height in inches, age in years. The program should then output the number of chocolate bars that
should be consumed to maintain ones weight for both a man and woman of
the input height, weight, and age.
Note that all units are in Imperial units (non-metric)

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.