Repeat Programming Project 5 but in addition ask the user if he or she is a. Sedentary

Question:

Repeat Programming Project 5 but in addition ask the user if he or she is 

a. Sedentary

b. Somewhat active (exercise occasionally)

c. Active (exercise 3–4 days per week)

d. Highly active (exercise every day)


If the user answers “Sedentary,” then increase the calculated BMR by 20 percent. If the user answers “Somewhat active,” then increase the calculated BMR by 30 percent. If the user answers “Active,” then increase the calculated BMR by 40 percent. Finally, if the user answers “Highly active,” then increase the calculated BMR by 50 percent. Output the number of chocolate bars based on the new BMR value.


Programming Project 5

Repeat the calorie-counting program described in Programming Project 8 from Chapter 2. This time ask the user to input the string “M” if the user is a man and “W” if the user is a woman. Use only the male formula to calculate calories if “M” is entered and use only the female formula to calculate calories if “W” is entered. Output the number of chocolate bars to consume as before.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: