To find the roots of a quadratic equation
you need to use the quadratic formula

This implies that if
the equation has no solutions, if
the equation has one double solution, and two distinct solutions otherwise.
So, the pseudocode could be something like this:
double delta = b*b - 4*a*c;
if (delta < 0) print ("There are no real solutions!");
else if(delta = 0) {
double x = -b/(2*a);
print("There is a double solution: " + x);
} else {
double det = sqrt(delta);
double x1 = (-b+det)/(2*a);
double x1 = (-b-det)/(2*a);
print ("The two solutions are " + x1 + "and" + x2);
}