output:

code:

function SolveEquation (a,b,c){

let d = b*b - 4*a*c
console.log(“delta = “,d)
if (d> 0) {
console.log(“equation”,a,“x^2+”,b,“x+”,c,”=0 have 2 equation:”)
console.log(“x1 =”, (-b +Math.sqrt(d))/(2*a))

console.log(“x2 =”, (-b -Math.sqrt(d))/(2*a))

}else{

if (d == 0){

console.log(“The equation has a double solution”)

}else{

console.log(“The equation don’t has solution”)

}

}

}

SolveEquation(1,-8,15)