Answer:
sum = 0 must be before for loop. If inside for loop, it will keep resetting sum to 0 each iteration.
Step-by-step explanation:
hope this helps
8.3m questions
10.9m answers