Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ Write a program that tracks how much book pages the user reads in total in a day and reports if the daily target

image text in transcribed
in c++
image text in transcribed
Write a program that tracks how much book pages the user reads in total in a day and reports if the daily target is reached or not. The program will keep reading int values, each representing pages read during an individual session within a day (pagesRead) until either the user enters 0 or the daily target of 125 pages is met. If the user enters O, the program should print the remaining pages to the daily target as an int 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 sessions given as an int, and finally printing the text session(s)" NOTE: You MUST use a repetitive statement in this question. NOTE: Each pages Read value MAY also be given as a negative value. These values should simply be skipped without affecting session count. Input 40 20 34 56 5 1267 5 67 -5 53 Output 65 Target is reached in Target is reached in 3 5 session(s) sessions) Write a program that tracks how much book pages the user reads in total in a day and reports if the daily target is reached or not. The program will keep reading int values, each representing pages read during an individual session within a day (pagesRead) until either the user enters 0 or the daily target of 125 pages is met. If the user enters 0, the program should print the remaining pages to the daily target as an int. 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 sessions given as an int and finally printing the text" session(s)". NOTE: You MUST use a repetitive statement in this question. NOTE: Each pagesRead value MAY also be given as a negative value. These values should simply be skipped without affecting session count. input 40 200 34 56 5 12 67 567-5 53 Output 65 Target is reached in Target is reached in 3 5 session(s) Session(s)

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Medicare tax?

Answered: 1 week ago

Question

Define and measure service productivity.

Answered: 1 week ago