How does the running total change?
Trace the algorithm by following its steps for Values = [4, 2, 7] and recording how Total changes. For each visits 4, then 2, then 7. Set Total to Total + Value adds the current value to the total already stored.
Which option gives Total after each repetition, in order, and the final output? Each arrow separates successive repetitions; it is not an additional calculation.
- Totals
4 -> 2 -> 7; final output7. - Totals
4 -> 0 -> 7; final output7. - Totals
4 -> 4 -> 11; final output11. - Totals
4 -> 6 -> 13; final output13.