Mathc matrices/Fichiers h : a03c0
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
void fun(int r,int c)
{
double **A = i_mR(r,c);
clrscrn();
printf(" A : \t\t i_mR();");
p_mR(A,S5,P0,C10);
printf(" A : \t\t r_mR();");
p_mR(r_mR( A ,9),S5,P0,C10);
printf(" A : \t\t m0_mR(A);");
m0_mR(A);
p_mR(A,S5,P0,C10);
stop();
clrscrn();
printf(" A : \t\t r_mR();");
p_mR(r_mR( A ,9),S5,P0,C10);
printf(" A : \t\t p_mR(m0_mR(A),S5,P0,C10);");
p_mR(m0_mR(A),S5,P0,C10);
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2,rp_I(C3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La matrice nulle.
Exemple de sortie écran :
A : i_mR();
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
A : r_mR();
+8 +2 +3 -5 +9
+5 +6 +4 +1 -5
+1 +4 -5 -8 -9
A : m0_mR(A);
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
Press return to continue.
A : r_mR();
-7 +8 +7 -5 -4
+9 +1 -7 +9 -6
+8 +3 +9 +8 +8
A : p_mR(m0_mR(A),S5,P0,C10);
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
+0 +0 +0 +0 +0
Press return to continue
Press X return to stop