Question: C. Write C++ code for a while loop that reads positive integers and computes their sum. It stops when the sum reaches the value
C. Write C++ code for a while loop that reads positive integers and computes their sum. It stops when the sum reaches the value of 50 or more. Once the loop stops, the number of integers read will be displayed. For example, if the inputs are 25 3 40, then the sum is 68 and the number of integers read is 3. (6mark)
Step by Step Solution
3.34 Rating (151 Votes )
There are 3 Steps involved in it
include iostream int main ... View full answer
Get step-by-step solutions from verified subject matter experts
