Question: C++ Integer numIn is read from input. Given the integer vector dailyPrices with the size of numIn, write a for loop that sums each integer
C++
Integer numIn is read from input. Given the integer vector dailyPrices with the size of numIn, write a for loop that sums each integer of dailyPrices together until either maxSum is greater than or equal to 200 or the end of the vector is reached.
Ex: If the input is
5
52 70 82 92 103
then the output is:
maxSum: 204
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
