Accumulator Simple Lists Tutorial
Jump to navigation Jump to search
Print the total of all of the numbers
- We initialise to 0.
- We add to the accumulator.
Print the product of all of the numbers.
- We initialise to 1.
- We multiply the accumulator.
Print the smallest item in the list.
Count Small Numbers
Print the number of numbers less than 3.
Sum Small Numbers
Print the sum of number of numbers less than 3.