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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  STANVL */
  4.  
  5.         main()
  6.  
  7.     {
  8.         int *fp,i,lcd,lcm,n;
  9.         static int m[4][4]={1,2,3,4,
  10.                             4,1,2,3,
  11.                             3,4,1,2,
  12.                             2,3,4,1};
  13.  
  14.         float ans[15],t[4];
  15.         static float d[4][4]={24.,37.,35.,42.,
  16.                               47.,85.,23.,47.,
  17.                               65.,49.,23.,62.,
  18.                               12.,14.,19.,23.};
  19.  
  20.         lcd = 4;
  21.         lcm = 4;
  22.         n = 4;
  23.  
  24.        stanvl(lcd,lcm,n,m,d,ans,t);
  25.  
  26.         *fp=fopen("PRN:","w");             /* open the printer */
  27.  
  28.         fprintf(*fp,"Test Results from STANVL\n");
  29.          printf("Test Results from STANVL\n\n");
  30.  
  31.  
  32.         for(i = 0; i <= 14; i++)
  33.         {
  34.          fprintf(*fp," ans[%d] = %15.8f \n",i,ans[i]);
  35.           printf(   " ans[%d] = %15.8f \n",i,ans[i]);
  36.         }
  37.      }
  38.  
  39.