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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  PLYCFC */
  4.  
  5.         main()
  6.  
  7.         {
  8.         int *fp,i,ndp,nds,ndc;
  9.         static float p[4]={4.,-17.,11.,5.},
  10.                      s[4]={2.,-3.,-11.,-3.};
  11.         float c[4];
  12.  
  13.         ndp = 3;
  14.         nds = 3;
  15.  
  16.         plycfc(p,s,ndp,nds,c,&ndc);
  17.  
  18.         *fp=fopen("PRN:","w");                 /* open the printer */
  19.  
  20.         fprintf(*fp,"Test Results from PLYCFC\n\n");
  21.          printf("Test Results from PLYCFC\n\n");
  22.  
  23.         fprintf(*fp,"  NDC= %d\n",ndc);
  24.          printf("  NDC= %d\n",ndc);
  25.  
  26.         for(i = 0; i <= ndc; i++)
  27.         {
  28.         fprintf(*fp,"%9.5f\n",c[i]);
  29.          printf("%9.5f\n",c[i]);
  30.         }
  31.      }
  32.