<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
<style type="text/css"></style>
<script src="scripts.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var valeurea;
var valeureb;
var valeurem;

var valeurec;
var valeured;
var valeuren;

function racines()
{
vala = document.system.valeurea.value;
valb = document.system.valeureb.value;
valm = document.system.valeurem.value;

valc = document.system.valeurec.value;
vald = document.system.valeured.value;	
valn = document.system.valeuren.value;
	
var delta = valc*valb - vala*vald;
var betax = valn*valb - valm*vald;
var gammay = valc*valm - vala*valn;

if ((vala == '') && (valb == '') && (valm == '') && (valc == '') && (vald == '') && (valn == '')) {
document.system.RESULTAT.value ="Entrer les valeurs des coefficients .. ";
document.system.RESULTAT1.value = " ";
document.system.RESULTAT2.value = " ";
}

else if (((delta == 0) && (betax == 0)) || ((delta == 0) && (gammay == 0))) {
document.system.RESULTAT.value ="Le système est indéterminé ..";
document.system.RESULTAT1.value = " ";
document.system.RESULTAT2.value = " ";
}

else
{
var result1 = betax/delta;
result1 = Math.round(result1*100)/100 ;

var result2= gammay/delta ;
result2 = Math.round(result2*100)/100 ;

document.system.RESULTAT.value ="Les solutions sont :";
document.system.RESULTAT1.value = " x = " + result1;
document.system.RESULTAT2.value = " y = " + result2;

}
}
// -->
</script>
</head>

<body>
<center>

<form name ="system"> 

<table border = "" width = "300" border = "0">

<tr><td colspan="2" class = "centre" width = "300" >
<img src = "images/system.jpg">
</td></tr>
<br />

<tr><td class = "centre" colspan="2"><input class = "centre" TYPE="button" 
SIZE ="15" VALUE ="Entrer la valeur des coefficients:" NAME="" onClick = "racines();" 
style = "color: blue; background-color:#AFEEEE; font-size: 15; font-family:Bookman old 
style; font-weight:bold;"> 
</TD></tr>



<tr><td class= "special">
<font color = "red" size = "+1"> a </font></TD><TD>
<input style="background-color:#AFEEEE; color:black; TYPE="txt" SIZE="15" VALUE="" 
NAME="valeurea">
</td></tr>

<tr><td class= "special">
<font color = "red" size = "+1"> b </font></TD>
<TD><input style="background-color:#AFEEEE; color:black; TYPE="txt" SIZE="15" 
VALUE="" NAME="valeureb"></td></tr>

<tr><td class= "special">
<font color = "red" size = "+1"> m</font></TD>
<TD><input style="background-color:#AFEEEE; color:black; TYPE="txt" SIZE="15" 
VALUE="" NAME="valeurem"></td></tr>


<tr><td class= "special">
<font color = "green" size = "+1"> c </td><TD>
<input style="background-color:#FFEFD5; color:black TYPE="txt" SIZE="15" VALUE="" 
NAME="valeurec">
</td></tr>

<tr><td class= "special">
<font color = "green" size = "+1"> d </td><TD>
<input style="background-color:#FFEFD5; color:black TYPE="txt" SIZE="15" VALUE="" 
NAME="valeured">
</td></tr>

<tr><td class= "special">
<font color = "green" size = "+1"> n </td><TD>
<input style="background-color:#FFEFD5; color:black TYPE="txt" SIZE="15" VALUE="" 
NAME="valeuren">
</td></tr>


<br /><br />
<tr><td class = "centre" colspan="1"><input class = "centre" TYPE="button" 
SIZE ="15" VALUE ="Résoudre le system:" NAME="" onClick = "racines();" 
style = "color: blue; background-color:#AFEEEE; font-size: 15; font-family:Bookman old 
style; font-weight:bold;"> 
</td>

<td class = "centre" colspan="1">
<input type="reset" style="background-color:#FFE4E1; color:black" SIZE="17" 
VALUE="Recommencer" ></td>
</tr>


<tr><td colspan="2">
<input align = "center" style="background-color:#E6E6FA; color:red; font-size:15"; 
TYPE="txt" SIZE="35" NAME="RESULTAT" VALUE="" color = "red"></td><TD>
</TD></tr>

<tr><td colspan="2">
<input align = "center" style="background-color:#E6E6FA; color:black; font-size:15"; 
TYPE="txt" SIZE="35" NAME="RESULTAT1" VALUE="" color = "red"></td><TD>
</TD></tr>

<tr><td colspan="2">
<input align = "center" style="background-color:#FFEFD5; color:black; font-size:15"; 
TYPE="txt" SIZE="35" NAME="RESULTAT2" VALUE="" color = "red"></td><TD>
</TD>
</tr>


</table>
</form>
<a href="system_source.html" target = "file2">code source</a>
</center>
</body>
</html>