Mathc complexes/Fichiers c : p m06
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
p_m06.c |
---|
/* ------------------------------------ */
/* Save as : p_m06.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r, int c)
{
int Cn ;
double **A = r_mZ(i_mZ(r,c),999);
for(Cn = c; Cn; Cn--)
{
clrscrn();
printf(" C%d Columns by row\n\n",Cn);
printf(" A : \n" );
p_mZ(A, S6,P0, S5,P0,Cn);
if(Cn!=C1)stop();
}
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
fun(rp_I(R3)+R1,rp_I(C5));
while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La fonction p_mZ(); a quatre paramètres. Le quatrième permet de contrôler le nombre de colonnes dessiné par ligne.
Exemple de sortie écran :
C3 Columns by row
A :
+46.86 +20.00i -49.75 -23.82i -8.86 -78.56i
+15.77 +32.45i -28.47 +37.18i +91.22 +12.43i
+18.72 +39.00i -97.84 +13.85i +4.50 -30.56i
Press return to continue.
C2 Columns by row
A :
+46.86 +20.00i -49.75 -23.82i
+15.77 +32.45i -28.47 +37.18i
+18.72 +39.00i -97.84 +13.85i
-8.86 -78.56i
+91.22 +12.43i
+4.50 -30.56i
Press return to continue.
C1 Columns by row
A :
+46.86 +20.00i
+15.77 +32.45i
+18.72 +39.00i
-49.75 -23.82i
-28.47 +37.18i
-97.84 +13.85i
-8.86 -78.56i
+91.22 +12.43i
+4.50 -30.56i
Press return to continue.