The command sum = sum + number
calculates the value of
sum + number
, adds the current number to the sum,
and stores the result in the variable sum
.
The new value of sum
will be used in the next loop.
In the beginning the sum is 0, and in the end the sum of our numbers will be printed.