The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.
The
loop in the following program is supposed to read some numbers until it reaches a sentinel (in this case, -1). It is supposed to add all of the numbers except for the sentinel. If the data looks like:
the program does not add the numbers correctly. Correct the program so that it adds the numbers correctly. (5)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.