Kod
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
</head>
<body>
<script type="text/javascript">
//zadanie 1
//skrypt pyta się o trzy wartości abc s srawdza czy liczba c jest w ab
let a = parseInt(Math.random()*100)
let b = parseInt(Math.random()*100)
let c = parseInt(Math.random()*100)
// Stare ↓
// let a=parseInt(prompt("podaj wartość a",""));
// let b=parseInt(prompt("podaj wartość b > a",""));
// let c=parseInt(prompt("podaj wartość c",""));
if(a>b){
let t=a
a=b
b=t
}
document.write("<h3>Wartości:</h3><hr>")
document.write("a = "+a+"<br>");
document.write("b = "+b+"<br>");
document.write("c = "+c+"<br>");
document.write("<h3>Wynik:</h3><hr>")
if(c>a && c<b){
document.write(`wartość c jest w przedziale <${a}:${b}>`);
}
else{
document.write(`wartość c nie jest w przedziale <${a}:${b}>`);
}
</script>
</body>
</html>