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.

Input: Values = [4, 2, 7]
Output: Total
Start
   Set Total to 0
   For each Value in Values
      If Value > 3
         Set Total to Total + Value
      End If
   End For
   Output Total
End

Which option gives Total after each repetition, in order, and the final output? Each arrow separates successive repetitions; it is not an additional calculation.

  1. Totals 4 -> 2 -> 7; final output 7.
  2. Totals 4 -> 0 -> 7; final output 7.
  3. Totals 4 -> 4 -> 11; final output 11.
  4. Totals 4 -> 6 -> 13; final output 13.