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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  STSPER */
  4.  
  5.         main()
  6.  
  7.         {
  8.  
  9.         static float a[5] = {480., 500., 520., 540.,  56.},
  10.                      b[5] = { 56.,  61.,  78.,  71.,  82.};
  11.         float r;
  12.         int *fp,n;
  13.  
  14.         *fp=fopen("PRN:","w");             /* open the printer */
  15.         fprintf(*fp,"Test Results from STSPER\n\n");
  16.         printf("Test Results from STSPER\n\n");
  17.  
  18.         n = 5;
  19.  
  20.         STSPER(n,a,b,&r);
  21.  
  22.         fprintf(*fp,"R = %15.7f\n\n",r);
  23.          printf("R = %15.7f\n\n",r);
  24.      }
  25.