accumulate function in c++ wrong sum code example Example: accumulate in cpp accumulate(start, end, initial_sum);