Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prompts a dieter to enter in their caloric budget (as an integer) for the week. After accepting and storing that value,

Write a program that prompts a dieter to enter in their caloric budget (as an integer) for the week. After accepting and storing that value, use a while loop to accept and process the caloric value for each meal (entered as an integer value). Within the while loop keep a running total of the caloric values of the meals entered and a count of the meals entered. Terminate the while loop when the dieter enters 0. After the while loop ends, print the count of meals entered and print a message (follow the examples in the example outputs) indicating whether the dieter's caloric total intake was at, above, or below their caloric budget.

Printed output messages will vary based on input but related output should be formatted as in the example outputs. The ellipsis is being used to represent missing values that your program should also generate.

Example Output 1

Example Output 2 (just trailing lines)

Example Output 3 (just trailing lines)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago