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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  NAORDR */
  4.  
  5.         main()
  6.  
  7.         {
  8.         int *fp,m,k,n;
  9.         static float f[10]={1.,8.,27.,64.,125.,216.,343.,512.,729.,1000.};
  10.         float eps;
  11.  
  12.         n = 10;
  13.         eps = 0.0001;
  14.  
  15.         naordr(n,f,eps,&m,&k);
  16.  
  17.         *fp=fopen("PRN:","w");                 /* open the printer */
  18.  
  19.         fprintf(*fp,"Test Results from NAORDR\n\n");
  20.          printf("Test Results from NAORDR\n\n");
  21.  
  22.         fprintf(*fp,"  M= %d   K= %d\n\n",m,k);
  23.          printf("  M= %d   k= %d\n\n",m,k);
  24.  
  25.         }
  26.  
  27.