trojuhelnik = false; if (Math.pow(a,2) + Math.pow(b,2) == Math.pow(c,2)) { trojuhelnik = true; } else { if (Math.pow(a,2) + Math.pow(c,2) == Math.pow(b,2)) { trojuhelnik = true; } else { if (Math.pow(b,2) + Math.pow(c,2) == Math.pow(a,2)) { trojuhelnik = true; } } } if (trojuhelnik) { alert("Trojúhelník je pravoúhlý."); } else { alert("Trojúhelník NENÍ pravoúhlý."); }