Aller au contenu

Mathc complexes/a145

Un livre de Wikilivres.

Application

Installer et compiler ce fichier dans votre répertoire de travail.

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
int main(void)
{
nb_Z a;
  

  clrscrn();

  a = i_Z(-.125,  .546);
  
 printf(" (");p_Z(a,S3,P4,S3,P4);printf(")**0 = ");
                 p_Z(pow_Z(0,a),S3,P6,S3,P6);printf("\n\n");

 printf(" (");p_Z(a,S3,P4,S3,P4);printf(")**1 = ");
                 p_Z(pow_Z(1,a),S3,P6,S3,P6);printf("\n\n");

 printf(" (");p_Z(a,S3,P4,S3,P4);printf(")**2 = ");
                 p_Z(pow_Z(2,a),S3,P6,S3,P6);printf("\n\n");

 printf(" (");p_Z(a,S3,P4,S3,P4);printf(")**3 = ");
                 p_Z(pow_Z(3,a),S3,P6,S3,P6);printf("\n\n");
 stop(); 
 
 return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */



Exemple de sortie écran :

 (-0.1250+0.5460i )**0 = +1.000000+0.000000i 

 (-0.1250+0.5460i )**1 = -0.125000+0.546000i 

 (-0.1250+0.5460i )**2 = -0.282491-0.136500i 

 (-0.1250+0.5460i )**3 = +0.109840-0.137178i 

 Press return to continue.