Quadratic equation

#include
#include<math.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
int d = bb - 4ac;
int x=(-b - sqrt(d))/(2
a);
int y=(-b + sqrt(d))/(2a);
if (d > 0){
cout << “Real and distinct \n”;
cout << min(x,y) << " "
<< max(x,y);
}
else if (d == 0)
{
cout << “Real and same \n”;
cout << -b / (2
a);
}
else
{
cout << “Complex \n”;}

return 0;

}

hi @kartik.tripathi25 its “Real and Equal” not “real and same”
The output should match exactly what is given in the question

still 1 test case is failed

@kartik.tripathi25 in case of d=0, you have to print the same root twice.

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.