1 / 23
Settings
<<<>>>
This animation shows the steps of an algorithm to add together and print the values in a list. This animation is an example of the accumulate pattern. The values in the list to be the price of items being purchased.
- 4
- 13
- 6
- 9
- 11
set
total
=
0
for each item
price
do
set
total
=
total + price
print (total)
STATE
price
total
CONSOLE