tags:

views:

39

answers:

1

Adding Values in a Loop

A: 

Initialize an accumulator before the loop, then just add each value to the accumulator in turn.

Ignacio Vazquez-Abrams