+ 4
Algorithms
Algorithm that will calculate the root a quadratic equation.
4 Answers
+ 1
Total how many algorithms are there in computer science?
+ 11
You can use the quadratic formula
x = (-b ± â(bÂČ-4ac)) / 2a
The implementation via programming languages should be pretty straightforward.
https://en.m.wikipedia.org/wiki/Quadratic_equation
+ 6
If you only want real (non complex) roots, first check that the discriminant (b^2-4ac) is not negative.
+ 3
Kcee if you need to build a algorithm that will solve quadratics then you can check out this code I have build a algorithms that does it by completing the Squares
https://code.sololearn.com/Wj1ruHhSVhw0/?ref=app