Aller au contenu

Mathc matrices/a197

Un livre de Wikilivres.


Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
int main(void)
{
int     n = 1;

double x1 = +0.25000000;
double x2 = +1.25000000;
double x3 = +0.75000000;
double x4 = +1.00000000;
	
    do{ 
	   clrscrn();
	   printf(" Continue until integers appear : \n\n\n");
	         
	   printf(" n = %d -> n*x1 = %0.4f  \n",n, n*x1);	
	   printf(" n = %d -> n*x2 = %0.4f  \n",n, n*x2);	
	   printf(" n = %d -> n*x3 = %0.4f  \n",n, n*x3);		   
	   printf(" n = %d -> n*x4 = %0.4f  \n",n, n*x4);		   
	   	   
	   n++;
	   
    }while(stop_w());

    return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
  • Quand n = 4
n = 4 -> n*x1 = 1.0000  
n = 4 -> n*x2 = 5.0000  
n = 4 -> n*x3 = 3.0000  
n = 4 -> n*x4 = 4.0000   

Cela nous donne les coefficients de l'équation :


Il suffit de remplacer les x1, x2,... par leurs valeurs numériques  :


Exemple de sortie écran :
 ---------------------
 Continue until integers appear : 


 n = 1 -> n*x1 = 0.2500  
 n = 1 -> n*x2 = 1.2500  
 n = 1 -> n*x3 = 0.7500  
 n = 1 -> n*x4 = 1.0000  

 Press   return to continue
 Press X return to stop    


 ---------------------
 Continue until integers appear : 


 n = 2 -> n*x1 = 0.5000  
 n = 2 -> n*x2 = 2.5000  
 n = 2 -> n*x3 = 1.5000  
 n = 2 -> n*x4 = 2.0000  

 Press   return to continue
 Press X return to stop    


 ---------------------
 Continue until integers appear : 


 n = 3 -> n*x1 = 0.7500  
 n = 3 -> n*x2 = 3.7500  
 n = 3 -> n*x3 = 2.2500  
 n = 3 -> n*x4 = 3.0000  

 Press   return to continue
 Press X return to stop    


 ---------------------
 Continue until integers appear : 


 n = 4 -> n*x1 = 1.0000  
 n = 4 -> n*x2 = 5.0000  
 n = 4 -> n*x3 = 3.0000  
 n = 4 -> n*x4 = 4.0000  

 Press   return to continue
 Press X return to stop