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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  STANV2 */
  4.  
  5.         main()
  6.  
  7.     {
  8.         int *fp,i,llc,nr,nc;
  9.         static float x[3][3]={1.26, 1.21, 1.19,
  10.                               1.29, 1.23, 1.23,
  11.                               1.38, 1.27, 1.22};
  12.         float av[13];
  13.  
  14.         llc = 3;
  15.         nr = 3;
  16.         nc = 3;
  17.  
  18.        stanv2(llc,nr,nc,x,av);
  19.  
  20.         *fp=fopen("PRN:","w");             /* open the printer */
  21.  
  22.         fprintf(*fp,"Test Results from STANV2\n");
  23.          printf("Test Results from STANV2\n\n");
  24.  
  25.         for(i = 0; i <= 12; i++)
  26.         {
  27.          fprintf(*fp," av[%d] = %15.8f \n",i,av[i]);
  28.           printf(   " av[%d] = %15.8f \n",i,av[i]);
  29.         }
  30.      }
  31.  
  32.