Java:two linear equations

domxaline -  
KX Messages postés 19031 Statut Modérateur -
Bonjour,
je ne sais comment écrire ce calcul en programme java;
si quelqu'un peut m'aider,ça m'ira bien, 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

A voir également:

1 réponse

KX Messages postés 19031 Statut Modérateur 3 020
 
Le dénominateur c'est ad-cb, mais CCM ne t'aidera pas à faire ton exercice.
0