Revising quadratic equation

#include
#include
using namespace std;
int main() {
float a, b, c, x1, x2, discriminant, realPart, imaginaryPart;
cin >> a >> b >> c;
discriminant = bb - 4a*c;

if (discriminant > 0) {
    x1 = (-b + sqrt(discriminant)) / (2*a);
    x2 = (-b - sqrt(discriminant)) / (2*a);
    cout << "real and distinct" << endl;
    cout << x1 << endl;
    cout << x2 << endl;
}

else if (discriminant == 0) {
    cout << "real and equal" << endl;
    x1 = (-b + sqrt(discriminant)) / (2*a);
    cout << x1 <<" "<<x1;
}
else {
    realPart = -b/(2*a);
    imaginaryPart =sqrt(-discriminant)/(2*a);
    cout << "imaginary";
}
return 0;

}

hi
save ur code to online ide coding blocks and then share the link
it make easy to debug

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.