Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Write a program that tracks how much calorie the user burns in total in a day and reports if the daily target is reached

image text in transcribed

Assignment Write a program that tracks how much calorie the user burns in total in a day and reports if the daily target is reached or not. The program will keep reading double values, each representing calories burned during an individual activity within a day (calorieBurned) until either the user enters or the daily target of 1800 calories is met. If the user enters , the program should print total calories burned as a double. Otherwise, the program should notify the user has reached the daily target by printing the text "Target is reached in", followed by the number of activities given as an int, and finally printing the text activity(ies)". NOTE: You MUST use a repetitive statement in this question. NOTE: Each calorieBurned value will be given as a non-negative value. You do NOT need to check this. \begin{tabulary(CCCC! Vhline Input & 1000500300 & $50584.320$ & 300500900600 Thline Output & Target is reached in 2 activity(ies) & $554.32$ & Target is reached in 4 activity(ies) W Thline \end{tabular) SE.SD.014

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

What is organizational culture?

Answered: 1 week ago

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago

Question

What are oxidation and reduction reactions? Explain with examples

Answered: 1 week ago