Computer Science, asked by cliffordkagodora, 2 months ago

write an algorithm to find all roots of a quadratic equation ax2+bx +c=0

Answers

Answered by krishmanr14
0

Explanation:

Input the value of a, b, c.

Calculate k = b*b - 4*a*c.

If (d < 0) Display "Roots are Imaginary, calculater1 = (-b +i ? k)/ 2a and r2 =(b + i? k)/ 2a. else if (d = 0) Display "Roots are Equal" and calculate r1 = r2 = (-b / 2*a) ...

Print r1 and r2.

End the algorithm.

Similar questions