document.write("What
");
var a = parseInt(prompt("Introduzca la A:"));
var b = parseInt(prompt("Introduzca la B:"));
var c = parseInt(prompt("Introduzca la C:"));
var d = Math.pow(b, 2) - 4 * a * c;
if (d >= 0) {
//TODO: Remember math class
var x1 = -b + Math.sqrt(d) / 2 * a;
var x2 = -b - Math.sqrt(d) / 2 * a;
document.write(`x1 = ${x1.toFixed(2)}
`);
document.write(`x2 = ${x2.toFixed(2)}`);
} else {
document.write(`RaĆz imaginaria?`);
}
//2 25 2
document.write(`
d = ${d}`);
//alert(`a\na`);