a,b,c = int user
x=\frac{-b+\sqrt{b^2-4ac}}{2a}
flowchart, pseudocode, c++
a = input()
b = input()
c = input()
d = b * b - 4 * a * c
if d < 0 -> no real roots (imaginary roots)
if d = 0 -> x = -b / (2 * a)
if d > 0 -> x1 = (-b - sqrt(d)) / (2 * a), x2 = (-b + sqrt(d)) / (2 * a)
Comments
Leave a comment