Accumulator Simple Lists Tutorial
From Progzoo
Reprise
Contents |
Sum
Print the total of all of the numbers
- We initialise to 0.
- We add to the accumulator.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
Product
Print the product of all of the numbers.
- We initialise to 1.
- We multiply the accumulator.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
Min
Print the smallest item in the list.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
Count Small Numbers
Print the number of numbers less than 3.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
Sum Small Numbers
Print the sum of number of numbers less than 3.
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
Count Even Numbers
[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]
