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

  1.         /* General form test program for scientific functions */
  2.  
  3.         /* Routine Tested:  YENBOB */
  4.  
  5.         main()
  6.  
  7.        {
  8.         int *fp,i,icol,icola;
  9.         static float a[3][4]={17.2,-1.8,-1.,-11.4,
  10.                               -1.8, 5.2, 2., -1.4,
  11.                               -1. , 2. , 6., -8.
  12.                               };
  13.  
  14.         icola = 4;
  15.         icol = 3;
  16.  
  17.         yenbob(a,icola,icol);
  18.  
  19.         *fp=fopen("PRN:","w");                /* open the printer */
  20.  
  21.         fprintf(*fp,"Test Results from YENBOB\n\n");
  22.          printf("Test Results from YENBOB\n\n");
  23.  
  24.         fprintf(*fp,"Column 4 of array A = solution\n");
  25.          printf(   "Column 4 of array A = solution\n");
  26.  
  27.         for(i = 0; i <= icol-1; i ++)
  28.         {
  29.         fprintf(*fp,"  %15.7f   \n",a[i][icol]);
  30.          printf(   "  %15.7f   \n",a[i][icol]);
  31.         }
  32.        }
  33.  
  34.