Quadratic equation

#include
#include<math.h>

using namespace std;

int main()
{
int a,b,c;
cin>>a>>b>>c;
int d = bb - 4ac;
double sq = sqrt(d);
double x = (-b + sq)/(2
a);
double x1 = (-b - sq)/(2*a);
if(d>0)
{
cout<<“Roots are real and different \n”;
cout<<x1<<" “<<x;
}
else
{
cout<<” Imaginary";
}
return 0;
}
this code is failing in 1testcases but 2nd is correct.
please tell me if something is wrong

@rastogi.g1998 If the roots are real and equal print the roots in increasing order and then check.
if(x>x1) then first print x1, after that x