Mathc complexes/Fichiers c : c01c
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void AplsB(int r,int c)
{
double **A[C3];
A[C0] = r_mZ(i_mZ(r,c),9);
A[C1] = r_mZ(i_mZ(r,c),9);
A[C2] = i_mZ(r,c);
clrscrn();
printf(" A0 : ");
p_mZ(A[C0],S5,P0, S3,P0, C6);
printf(" A1 : ");
p_mZ(A[C1],S5,P0, S3,P0, C6);
printf(" A0plsA1 : ");
p_mZ(add_mZ(A[C0],A[C1],A[C2]),S5,P0, S3,P0, C6);
f_mZ(A[C0]);
f_mZ(A[C1]);
f_mZ(A[C2]);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do{
AplsB(rp_I(C5),rp_I(C5));
}while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
...
Exemple de sortie écran :
A0 :
+7 -1i
-3 -5i
-1 +6i
+2 -6i
A1 :
+5 +9i
+1 -8i
+6 -3i
-7 +1i
A0plsA1 :
+12 +8i
-2-13i
+5 +3i
-5 -5i
Press return to continue
Press X to stop