32
This is a common trick where you use a variable to keep track of a total inside a loop. Imagine starting with 0 Naira and adding 100 Naira every time you complete a chore.
You say total = total + 100 inside the loop. By the end, the 'total' variable has accumulated all the values. It’s how we do sums in coding.
Log in to add a comment.