two linear equations - Java - Programmation
Marsh Posté le 28-02-2012 à 11:30:31
Ben c'est un bête système d'équations à 2 inconnues, niveau 3ème ou seconde Pour le résoudre, méthode de substitution ou via les matrices, avec le pivot de Gauss, par ex.
Pour rappel, il faut que le déterminant de la matrice soit non nul (donc ad-cd != 0)...
Cela dit, pour rappel, on fiat pas les exos sur ce forum. Vu ton post, ça y ressemble fort. Si tu veux plus d'aide, merci de poster ton code et dire où tu coinces.
Marsh Posté le 27-02-2012 à 18:14:51
bonjour
j'ai un pb pour écrire ce prgramme de maths quelqu'un peut m'aider svp
A set of two linear equations with two unknowns x_1 and x_2 is given below:
ax_1 + bx_2 = m
cx_1 + dx_2 = n
The set has a unique solution
x_1=(md-bn)/(ad-cd)
x_2= (na-mc)/(ad-cd)
Provided the denominateur ad -cd is not equal to zero.
Write a program that will read the values of contants a, b, c, d, m and n and
compute the values of x_1 and x_2
An appropriate message should be printed if ad -cd = 0.
merci d'avance