double sum2(double* first, double* last);
Returns the sum of the squares of the elements in [first, last).
Parameters:
| first | Beginning iterator for the container of elements. |
|---|---|
| last | Ending iterator for the container of elements. |
Returns:
Sum of the squares of the elements
Usage:
double s[4] = {1.1, 2.2, 3.3, 4.4};
double sm = sum2(s, s + 4);
Header:
#include "descript.h"