Aller au contenu

Mathc matrices/a200

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.66666667;
double x2 = +0.83333333;
double x3 = +0.66666667;
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 = 6
n = 6 -> n*x1 = 4.0000  
n = 6 -> n*x2 = 5.0000  
n = 6 -> n*x3 = 4.0000  
n = 6 -> n*x4 = 6.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.6667  
 n = 1 -> n*x2 = 0.8333  
 n = 1 -> n*x3 = 0.6667  
 n = 1 -> n*x4 = 1.0000  

 Press   return to continue
 Press X return to stop    

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


 n = 2 -> n*x1 = 1.3333  
 n = 2 -> n*x2 = 1.6667  
 n = 2 -> n*x3 = 1.3333  
 n = 2 -> n*x4 = 2.0000  

 Press   return to continue
 Press X return to stop    


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


 n = 3 -> n*x1 = 2.0000  
 n = 3 -> n*x2 = 2.5000  
 n = 3 -> n*x3 = 2.0000  
 n = 3 -> n*x4 = 3.0000  

 Press   return to continue
 Press X return to stop    


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


 n = 4 -> n*x1 = 2.6667  
 n = 4 -> n*x2 = 3.3333  
 n = 4 -> n*x3 = 2.6667  
 n = 4 -> n*x4 = 4.0000  

 Press   return to continue
 Press X return to stop    


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


 n = 5 -> n*x1 = 3.3333  
 n = 5 -> n*x2 = 4.1667  
 n = 5 -> n*x3 = 3.3333  
 n = 5 -> n*x4 = 5.0000  

 Press   return to continue
 Press X return to stop    

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


 n = 6 -> n*x1 = 4.0000  
 n = 6 -> n*x2 = 5.0000  
 n = 6 -> n*x3 = 4.0000  
 n = 6 -> n*x4 = 6.0000  

 Press   return to continue
 Press X return to stop