function calcPyth(){
let v1 = document.getElementById("v1").value;
let v2 = document.getElementById("v2").value;
let v3 = document.getElementById("v3").value;
if((v1 * v1)==(v2*v2)+(v3*v3) ){
alert("These are pythagoras triplets");
}else if((v1 * v1)<(v2*v2)+(v3*v3)){
alert("This is an obtuse triangle");
}else{
alert("This is an acute triangle");
}}
When I try to run to run the statement, it only returns the else if value.I have no idea what to do.
Aucun commentaire:
Enregistrer un commentaire