home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_06 / 1006090a < prev    next >
Text File  |  1991-09-09  |  474b  |  32 lines

  1. /* LISTING 4 */
  2.  
  3. #include <stdlib.h>
  4. static double c[200];
  5.  
  6. f4()
  7. {
  8.     double a[200];
  9.     double *b;
  10.  
  11.     b = (double *)malloc(200 * sizeof(double));
  12.  
  13.     f4sub1(c,b,a,200);  
  14.     f4sub2(c+1,c,a,200);
  15. }
  16.  
  17. f4sub1(double *p, double *q, double *r, int n) 
  18. {
  19.     int i;
  20.  
  21.     for( i=0; i<200; ++i )
  22.         *p++ = *q++ / *r++;
  23. }
  24.  
  25. f4sub2(double *p, double *q, double *r, int n) 
  26. {
  27.     int i;
  28.  
  29.     for( i=0; i<200; ++i )
  30.         *p++ = *q++ / *r++;
  31. }
  32.