A bag of cookies holds 40 cookies. The calorie information on the bag claims thatthere are 10 servings in the bag and that a single serving equals 300 calories.Design and write a C++ program that...

A bag of cookies holds 40 cookies. The calorie information on the bag claims that
there are 10 servings in the bag and that a single serving equals 300 calories.
Design and write a C++ program that prompts your user for the number of
cookies that he or she actually ate from one of these bags and then displays the
number of calories they consumed.
We want you to learn how to write programs that are robust and potentially
reusable.
Use variables to represent the given information, such as the number of cookies in
a bag and the number of calories in a serving. Compose statements using the
given variables to calculate the number of calories in each cookie. The use of
magic is not permitted in computer programming. You, as the programmer must
compose steps that store given information in variables and then use these
variables to determine values such as the number of calories in each cookie.
Submit the following documents.
1. C++ source file .cpp
2. Screen shot for the execution of your program.
Mar 27, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here