Mathc complexes/a206
Installer et compiler ce fichier dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
int main(void)
{
double **A = i_mZ(R3,C4);
nb_Z z = {99.,66.};
//nb_Z z = i_Z(99.,66.);
clrscrn();
printf(" z : ");p_Z(z, S5,P0, S4,P0);printf("\n\n");
c_z_mZ(z,A,R1,C1);
printf(" A : c_s_mZ(z,A,R1,C1); z->A[R1,C1]\n");
p_mZ(A, S5,P0, S4,P0,C6);
m0_mZ(A);
c_z_mZ(z,A,R1,C2);
printf(" A : c_s_mZ(z,A,R1,C2); z->A[R1,C2]\n");
p_mZ(A, S5,P0, S4,P0,C6);
m0_mZ(A);
c_z_mZ(z,A,R3,C3);
printf(" A : c_s_mZ(z,A,R3,C3); z->A[R3,C3]\n");
p_mZ(A, S5,P0, S4,P0,C6);
stop();
f_mZ(A);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La fonction peut copier un nombre réel dans la partie réelle ou imaginaire d'un nombre de A.
Exemple de sortie écran :
z : +99 +66i
A : c_s_mZ(z,A,R1,C1); z->A[R1,C1]
+99 +66i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
A : c_s_mZ(z,A,R1,C2); z->A[R1,C2]
+0 +0i +99 +66i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
A : c_s_mZ(z,A,R3,C3); z->A[R3,C3]
+0 +0i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +99 +66i +0 +0i
Press return to continue.