Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<script type="text/javascript">
a = prompt("Въведете едно число :", "");
b = prompt("Въведете едно число :", "");
c = prompt("Въведете едно число :", "");
d=b*b-4*a*c;
if(d<0) {
document.write("При d<0 Уравнението няма реални корени!");
}
else if(d==0) {
x1 = -b-Math.sqrt(d)/a;
document.write("При d=0, x1=x2=" + x1);
}
else if(d>0) {
x1 = -b-Math.sqrt(d)/2*a;
x2 = -b+Math.sqrt(d)/2*a;
document.write("При d>0, x1=" + x1 + ", x2=" +x2);
}
</script>