Linear Algebra and the C Language/a0er


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r, int c)
{
double **A = i_mR(r,c);
int  Sn ;

  for(Sn = c+2; Sn<15; Sn++)
      {
       clrscrn();

       printf(" S%d spaces between each number\n\n",Sn);
  
       printf(" A:" );
       p_mR(A, Sn,P2,C6);
       
       stop();
      }      
   
  f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
  
  do{ 
        fun(rp_I(R4),rp_I(C3)+2);
        clrscrn();
        
   }while(stop_w());       

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Sn: Allows you to control the space between numbers.

Screen output example:

                                                                                       
 S7 spaces between each number

 A: 
  +0.00   +0.00   +0.00   +0.00   +0.00 
  +0.00   +0.00   +0.00   +0.00   +0.00 
  +0.00   +0.00   +0.00   +0.00   +0.00 
  +0.00   +0.00   +0.00   +0.00   +0.00 

 Press return to continue. 


 S8 spaces between each number

 A: 
   +0.00    +0.00    +0.00    +0.00    +0.00 
   +0.00    +0.00    +0.00    +0.00    +0.00 
   +0.00    +0.00    +0.00    +0.00    +0.00 
   +0.00    +0.00    +0.00    +0.00    +0.00 

 Press return to continue. 


 S9 spaces between each number

 A: 
    +0.00     +0.00     +0.00     +0.00     +0.00 
    +0.00     +0.00     +0.00     +0.00     +0.00 
    +0.00     +0.00     +0.00     +0.00     +0.00 
    +0.00     +0.00     +0.00     +0.00     +0.00 

 Press return to continue.