home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-SSP.ARJ / VEPROD.TST < prev    next >
Encoding:
Text File  |  1984-08-31  |  601 b   |  27 lines

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  VEPROD */
  4.  
  5.         main()
  6.  
  7.         {
  8.         int *fp,n;
  9.         static float a[8]={1.,2.,3.,4.,5.,6.,7.,8.};
  10.         static float b[8]={3.,6.,9.,12.,15.,18.,21.,24.};
  11.         float c;
  12.  
  13.         n = 8;
  14.  
  15.         *fp=fopen("PRN:","w");                 /* open the printer */
  16.  
  17.         fprintf(*fp,"Test Results from VEPROD\n\n");
  18.          printf("Test Results from VEPROD\n\n");
  19.  
  20.  
  21.         veprod(a,b,&c,n);
  22.  
  23.          fprintf(*fp,"%9.4f\n",c);
  24.           printf("%9.4f\n",c);
  25.  
  26.         }
  27.