Write a complete C++ program that takes the users' weight and their lifestyle as an input...
Fantastic news! We've Found the answer you've been seeking!
Question:
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 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 Answer:
Answer rating: 100% (QA)
Heres a C program that implements the functionality you described include iostream int main ... View the full answer
Posted Date:
Students also viewed these programming questions
-
You need to write a paper about the leadership and your responsibility in an organization. Which types of problems can be occurred and how can you face them
-
Which of the four skills in Exercise 7-2 would be most important for Wallys replacement?
-
An initially empty cylinder is filled with air from 70 F, 15 psia until it is full. Assuming no heat transfer is the final temperature larger, equal to or smaller than 70 F? Does the final T depend...
-
Snail Creek Kennel, Inc., earns service revenue by caring for the pets of customers. Snail Creeks main expense is the salary paid to an employee. Requirement 1. Write the accounting equation for the...
-
An investor requires a return of 12 percent. A stock sells for $25, it pays a dividend of $1, and the dividends compound annually at 7 percent. Will this investor find the stock attractive? What is...
-
train cars, maintenance, and so on. Variable cost per passenger would remain at $90. 1. Should the company obtain the route? 2. How many passenger train cars must Norwalk Express operate to earn...
-
Simplify the algebraic expression. 4x-4[2-(4-4x)]
-
A long power transmission cable is buried at a depth (ground-to-cable-centerline distance) of \(1 \mathrm{~m}\). The cable is encased in a thin-walled pipe of \(0.05-\mathrm{m}\) diameter, and, to...
-
In Figure P31.67, calculate the magnitudes of currents \(I_{1}\), \(I_{2}\), and \(I_{3}\). Figure P31.67 300 www 12 V 12 1200 9V 1.5 V 1000 (2 600 02 1.5 V
-
The following data on number of cycles to failure (10 6 ) appears in the article An Experimental Study of Influence of Lubrication Methods on Efficiency and Contact Fatigue Life of Spur Gears (J....
-
Increased awareness of mental health at work, and a slowly diminishing stigma about admitting to feeling anxious, stressed or maybe prone to crying, are positive signs about cultural change. However,...
-
The numbers of weeks the 33 leading movies remained at number 1 as of March 2018. Find the mean, the median, and the mode of the data, if possible. If any measure cannot be found or does not...
-
Amber corporation purchase 40,000 shares of its own $10 par value common stock for $50 per share. what will be the effect on stockholders' equity?
-
Determine the annual percentage yield for a loan that charges a monthly interest rate of 1.5% and compounds the interest monthly.
-
Derive and expression for principal stresses in a body subjected to complex state of stress.
-
Derive the relationship between elastic constants.
-
Defined principal stresses and principal planes.
Study smarter with the SolutionInn App