My code is failing for some of the test cases

#include
#include<math.h>
using namespace std;
double discriminanat(int a,int b,int c)
{
int x;
double d;
x=bb-4ac;
d=sqrt(x);
return d;
}
int main() {
int a,b,c,x1,x2;
double d;
cin>>a>>b>>c;
d=discriminanat(a,b,c);
if(d>=0)
{
x1=(-b-d)/2
a;
x2=(-b+d)/2*a;
if(d==0)
cout<<“Real and Same”<<endl<<x1<<" “<<x2;
else
cout<<“Real and Distinct”<<endl<<x1<<” "<<x2;
}
return 0;
}

@namangarg31
hello Naman,


a) u are not printing anything when d<0 ( in this case u should print type of root)
b) u need to print roots in increasing order that first u should print minimum and then maximum root