/*
# proc: sumints - computes the summation of the given integer list, sum(x).
# proc:
# proc: sumprodints - computes the summation of two integer lists pointwise
# proc:               multiplied, sum(x*y).
*/

sumints(l, n)
int *l, n;
{
   int i, s = 0;

   for(i = 0; i < n; i++)
      s += l[i];
   return(s);
}

sumprodints(l1, l2, n)
int *l1, *l2, n;
{
   int i, s = 0;

   for(i = 0; i < n; i++)
      s += (l1[i] * l2[i]);
   return(s);
}
