My Programming Lab

8. Cookie Calories
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 serving equals 300 calories. Write a JAVA program that lets theuser enter the number of cookies he or she actually ate and then reports the number of total calories consumed.

SAMPLE RUN #6: java CookieCalorieCounter

Enter·number·of·cookies·eaten:3↵ ·Your·calorie·intake·was:·225·calories.↵

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now