Mathc complexes/a79
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r,int c)
{
double **A = r_mZ(i_mZ(r,c),99.);
double **B = i_mZ(r,c);
clrscrn();
printf(" A :");
pall_mZ(A, S5,P0, S4,P0);
printf(" A : M_swapC_mZ(A,C1,C2)");
pall_mZ(M_swapC_mZ(A,C1,C2), S5,P0, S4,P0);
stop();
clrscrn();
printf(" A :");
pall_mZ(A, S5,P0, S4,P0);
printf(" B : c_withR0_mZ(A,B)");
pall_mZ(c_withR0_mZ(A,B), S5,P0, S4,P0);
f_mZ(A);
f_mZ(B);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
int i;
do
{
i = rp_I(R2)+R1;
fun(i,i+C1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Copier une matrice avec la ligne zéro
Exemple de sortie écran :
--------------------------------
A :
+4 +1 0 +2 0 +3 0 +4 0
+9 +10 -67i -45 -84i +65 +69i -38 -83i
+0 +45 +57i -9 +79i +95 +74i +34 -6i
+0 +69 -8i -32 -30i -39 +37i -27 +61i
A : M_swapC_mZ(A,C1,C2)
+4 +2 0 +1 0 +3 0 +4 0
+9 -45 -84i +10 -67i +65 +69i -38 -83i
+0 -9 +79i +45 +57i +95 +74i +34 -6i
+0 -32 -30i +69 -8i -39 +37i -27 +61i
Press return to continue.
--------------------------------
A :
+4 +2 0 +1 0 +3 0 +4 0
+9 -45 -84i +10 -67i +65 +69i -38 -83i
+0 -9 +79i +45 +57i +95 +74i +34 -6i
+0 -32 -30i +69 -8i -39 +37i -27 +61i
B : c_withR0_mZ(A,B)
+4 +2 0 +1 0 +3 0 +4 0
+9 -45 -84i +10 -67i +65 +69i -38 -83i
+0 -9 +79i +45 +57i +95 +74i +34 -6i
+0 -32 -30i +69 -8i -39 +37i -27 +61i
Press return to continue
Press X return to stop