Defined in header <numeric> template< class InputIt, class T >
T accumulate( InputIt first, InputIt last, T init ); (1) template< class InputIt, class T, class BinaryOperation >
T accumulate( InputIt first, InputIt last, T init,
BinaryOperation op ); (2)
Computes the sum of the given value init and the elements in the range [first, last). The first version uses operator+ to sum up the elements, the second version uses the given binary functio