Java:two linear equations

Fermé
domxaline - 27 févr. 2012 à 18:05
KX Messages postés 16760 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 12 février 2025 - 27 févr. 2012 à 18:26
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 16760 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 12 février 2025 3 020
27 févr. 2012 à 18:26
Le dénominateur c'est ad-cb, mais CCM ne t'aidera pas à faire ton exercice.
0