sump

double sump(double* first1, double* last1, double* first2);

Returns the sum of the products of the corresponding elements in [first1, last1) and [first2, first2 + (last1 - first1) ).

Parameters:
first1Beginning iterator for the first container of elements.
last1Ending iterator for the first container of elements.
first2Beginning iterator for the second container of elements.

Returns:
Sum of the products

Usage:
double s[4] = {1.1, 2.2, 3.3, 4.4};
int t[4] = {4, 3, 2, 1};
double sm = sump(s, s + 4, t);

Header:
#include "descript.h"