Mathc complexes/a205
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);
double s = 99.;
clrscrn();
c_s_mZ(s,A,R1,C1);
printf(" A : c_s_mZ(%.0f,A,R1,C1); s->A[R1,C1]\n",s);
p_mZ(A, S5,P0, S4,P0,C6);
m0_mZ(A);
c_s_mZ(s,A,R1,C2);
printf(" A : c_s_mZ(%.0f,A,R1,C2); s->A[R1,C2]\n",s);
p_mZ(A, S5,P0, S4,P0,C6);
m0_mZ(A);
c_s_mZ(s,A,R2,C6);
printf(" A : c_s_mZ(%.0f,A,R2,C6); s->A[R2,C6]\n",s);
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 :
A : c_s_mZ(99,A,R1,C1); s->A[R1,C1]
+99 +0i +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(99,A,R1,C2); s->A[R1,C2]
+0 +99i +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(99,A,R2,C6); s->A[R2,C6]
+0 +0i +0 +0i +0 +0i +0 +0i
+0 +0i +0 +0i +0 +99i +0 +0i
+0 +0i +0 +0i +0 +0i +0 +0i
Press return to continue.