Write a function that separately sums the even indexed elements and odd indexed elements of an array of doubles. Each element of the array contributes to one of the two sums, depending on whether the index of the element is even or odd. Your function definition must have a heading like
this:
void sum(double b[ ])
{ int n;
double *sum_even;
double *sum_odd;
if (
:
}
this:
void sum(double b[ ])
{ int n;
double *sum_even;
double *sum_odd;
if (
:
}