Create a project titled Lab5_BMR with a single file titled bmr.cpp The program should calculate the person's Basal Metabolic Rate - the number of calories per day a person's body needs to function. Then, on the basis of calculated BMR, your program should output how many doughnuts a person can consume. A medium-size doughnut contains 251 calories.
The BMR formula is as follows:
655 + (4.3 x weight in pounds) + (4.7 x height in inches) - (4.7 x age in years)
66 + (6.3 x weight in pounds) + (12.9 x height in inches) - (6.8 x age in years)
Depending on gender, BMR should be calculated by functions bmrWomen() and bmrMen() that both accept three parameters: "weight in pounds", "height in inches" and "age in years" and return the BMR. Note that the BMR has a fractional part.
The main function should prompt the user for her gender, weight, height and age; compute the BMR and the number of doughnuts that can be consumed per day; and then output both the BMR and the number doughnuts.
The number of doughnuts is: BMR divided by the number of calories in a doughnut. Fractional number of doughnuts can be dropped. The number of calories per doughnut (251) should be put in a named constant.
On the basis of the user's gender, Make sure to use the bmr function prototypes and put the function
definitions below the main function definition.
You can reuse your code from the Looping lab. Place the star-printing
code in three separate
functions: square, leftTriangle
and rightTriangle. Each function should accept a single
integer parameter - the size of the figure and return no value (be a
void-function). Create three separate
files figures.cpp, figures.h,
and figuresInput.cpp. Place the triangle and square
function definitions in figures.cpp and their prototypes
in figures.h. Make sure that the header file is protected
against multiple inclusion. Place the main function
in figuresInput.cpp
1. square
2. left triangle
3. right triangle
select figure: 2
select size: 4
****
***
**
*
1. square
2. left triangle
3. right triangle
...