Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c02d.c
/* ------------------------------------ */
/*  Save as :  c02d.c                   */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int rc)
{
double **A = r_mR(i_mR(rc,rc),9.);
double **B =      i_mR(rc,rc);

double s = 2;

int    r = rp_I(A[C_SIZE][C0]-C1);

  clrscrn();
  printf(" A:");
  p_mR(A,S3,P0,C6);
  printf(" The row[%d] of A is muliply by (%+.3f):\n",r,s);
  printf(" B:");
  p_mR(mulR_mR(c_mR(A,B),s,r),S3,P0,C6);

  printf("  If B is the matrix that  results when \n");
  printf("  a single row of A is muliplied by  \n");
  printf("  a scalar s, then det(B) = s det(A)\n\n");
  printf("   det_R(B) = %+.0f\n",  det_R(B));
  printf(" s*det_R(A) = %+.0f\n",s*det_R(A));
  printf("   det_R(A) = %+.0f\n",det_R(A));

  f_mR(A);
  f_mR(B);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
do
{
  fun(rp_I(RC3)+RC1);
  
} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */




Exemple de sortie écran :
 A:
 +2  -7  +2  -1 
 +4  +4  +2  -9 
 +8  -5  -1  -5 
 +4  +4  -1  +6 

 The row[4] of A is muliply by (+2.000):
 B:
 +2  -7  +2  -1 
 +4  +4  +2  -9 
 +8  -5  -1  -5 
 +8  +8  -2 +12 

  If B is the matrix that  results when 
  a single row of A is muliplied by  
  a scalar s, then det(B) = s det(A)

   det_R(B) = -5244
 s*det_R(A) = -5244
   det_R(A) = -2622

 Press return to continue
 Press X      to stop