Question: Write a basic C++ program that will calculate a subjects basal metabolic rate and estimate how many days it will take to lose a specific

Write a basic C++ program that will calculate a subjects basal metabolic rate and estimate how many days it will take to lose a specific number of pounds. The program will perform the following tasks:

  1. Declare variables and Named constants.
  2. Display Welcome to s Weight Loss Calculator
  3. Prompt the user to enter the subjects current weight.
  4. Prompt the user to enter the subjects height in feet plus inches.
  5. Prompt the user to enter the subjects age.
  6. Prompt the user to enter the subjects sex. (hint use type char to store M or F)
  7. Prompt the user to enter the subjects Activity Level (1.2-1.9) Sedentary-Extremely Active
  8. Prompt for the daily calorie reduction the subject is willing to sustain at current activity level: (hint use a variable named calReduc)
  9. Prompt for the subjects target weight
  10. Prompt the user to enter the subjects first name.
  11. Calculate the subjects height in inches (height= feet *12+ inches)
  12. If the subject is Female calculate basal metabolic rate: bmr= 655.0955 + (4.35 * weight ) + (4.7 * height) - (4.6756 * age).
  13. Use Named Constants for the Factors 655.0955, 4.35, 4.7, and 4.6756.
  14. Else for males calculate bmr= 66.473 + (6.237621 * weight) + (12.70838 * height) - (6.755 * age).
  15. Use Named Constants for the Factors 66.473, 6.237621, 12.70838 , and 6.755
  16. Calculate the adjusted bmradj=bmr*actLevel.
  17. Calculate the required daily caloric intake: dailyCals=bmradj-calReduc;
  18. Calculate weight to lose: wtToLose=weight-targetWt.
  19. Calculate days to target weight; daysToTarget = 3500*wtToLose/calReduc
  20. Clear the console screen: (hint use system(cls);)
  21. Display to the monitor the report heading
  22. Display the subjects bmr, adjusted bmr, caloric reduction, required caloric intake, weight to lose, days to reach target as shown in the report layout below.
  23. Thank the user for using the calculator.
  24. Calculate and display the number of days needed to reach a (Body Mass Index) BMI of 23.

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!