Mathc matrices/c072b
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c02b.c |
---|
/* ------------------------------------ */
/* Save as : c02b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mR(i_mR(r,r),9.);
double **B = r_mR(i_mR(r,r),9.);
double **AB = i_mR(r,r);
clrscrn();
printf(" A \n");
p_mR(A,S3,P0,C6);
printf(" B \n");
p_mR(B,S3,P0,C6);
printf(" det(A) * det(B) = %+.0f\n",det_R(A)*det_R(B));
printf(" det(AB) = %+.0f\n",det_R(mul_mR(A,B,AB)));
f_mR(A);
f_mR(B);
f_mR(AB);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC4)+RC1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
A
-9 -5 -3 +2
-5 -5 +4 -3
+4 -9 +8 -1
+4 -7 +4 +8
B
-1 -7 +4 +4
-5 +4 -1 -7
+8 -7 -1 +2
-5 -3 -3 +2
det(A) * det(B) = -7333497
det(AB) = -7333497
Press return to continue
Press X to stop