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

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