A function that is used to add all numbers in a range.