output:
code:
function SolveEquation (a,b,c){
let d = bb - 4ac
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))/(2a))
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)