Reference no: EM132153439
Assignment : Calculating Calories
Your goal is to take in the number of cookies per serving, the number of calories per serving, and thenumber of cookies eaten to determine the total number of calories consumed.
Your program should have the following:
3 comment lines (description of the program, author, and date).
Ask the user for the number of cookies per serving using the cin statement. Store this resultin a variable with an appropriate name.
Ask the user for the number of calories per serving using the cin statement.
Store this resultin a variable with an appropriate name.
Create an equation to divide the number of cookies per serving by the number of caloriesper serving. Save the result in a variable with an appropriate name.
Ask the user for the number of cookies that they ate using the cin statement. Store thisresult in a variable with an appropriate name.
Display the number of calories consumed using a cout statement.