<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>Саррюс</title><style>
input{width:60px;text-align:center;font-size:18px;margin:4px}
button{margin:15px;padding:8px 20px;font-size:16px}
</style></head>
<body>
<center>
<h3>Правило Саррюса</h3>
<input id="a" value=1> <input id="b" value=2> <input id="c" value=3><br>
<input id="d" value=4> <input id="e" value=5> <input id="f" value=6><br>
<input id="g" value=7> <input id="h" value=8> <input id="i" value=9><br>
<button onclick="calc()">Вычислить</button>
<h2 id="out"></h2>
<script>
function calc(){
let a=parseFloat(document.getElementById('a').value);
let b=parseFloat(document.getElementById('b').value);
let c=parseFloat(document.getElementById('c').value);
let d=parseFloat(document.getElementById('d').value);
let e=parseFloat(document.getElementById('e').value);
let f=parseFloat(document.getElementById('f').value);
let g=parseFloat(document.getElementById('g').value);
let h=parseFloat(document.getElementById('h').value);
let i=parseFloat(document.getElementById('i').value);
let det = (a*e*i + b*f*g + c*d*h) - (c*e*g + a*f*h + b*d*i);
document.getElementById('out').innerText = "Определитель = " + det;
}
</script>
</center>
</body>
</html>