-) Write a complete C++ program that takes the users' weight and their lifestyle as an input and recommends the number of calories they should take per day. Your program needs to take users' weight as an integer value and their lifestyle as a character that shows if they are active (a) or sedentary (inactive) (s). Your program then calculates the number of calories by multiplying the users' weight with the activity factor. If the person is sedentary, that person's activity factor is 13. If the person is active, that person's activity factor is 15. Sample Run Please enter your weight: 60 Do you have an active (a) or sedentary (s) lifestyle? s The recommended number of calories: 780

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.2: Arrays Of Structures
Problem 3E
icon
Related questions
Question
-) Write a complete C++ program that takes the users' weight and their lifestyle as an input and
recommends the number of calories they should take per day. Your program needs to take users' weight as an
integer value and their lifestyle as a character that shows if they are active (a) or sedentary (inactive) (s). Your
program then calculates the number of calories by multiplying the users' weight with the activity factor. If the
person is sedentary, that person's activity factor is 13. If the person is active, that person's activity factor is 15.
Sample Run
Please enter your weight: 60
Do you have an active (a) or sedentary (s) lifestyle? s
The recommended number of calories: 780
Transcribed Image Text:-) Write a complete C++ program that takes the users' weight and their lifestyle as an input and recommends the number of calories they should take per day. Your program needs to take users' weight as an integer value and their lifestyle as a character that shows if they are active (a) or sedentary (inactive) (s). Your program then calculates the number of calories by multiplying the users' weight with the activity factor. If the person is sedentary, that person's activity factor is 13. If the person is active, that person's activity factor is 15. Sample Run Please enter your weight: 60 Do you have an active (a) or sedentary (s) lifestyle? s The recommended number of calories: 780
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr