home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / borland / jnfb88.arc / CFLOAT.ARC / DOT.C < prev    next >
Text File  |  1987-06-23  |  188b  |  11 lines

  1. /* Listing 4: */
  2.  
  3. double dot(int n, double *x, double *y)
  4. {
  5.      int i;
  6.      double sum = 0.;
  7.      for (i = 0; i < n; ++i)
  8.           sum = sum + x[i] * y[i];
  9.      return sum;
  10. }
  11.