Roots of eqfuation what is error in this code

using namespace std;
#include
#include
int main()
{

float d,a,b,c;
cin>>a>>b>>c;

d=b*b-4*a*c;

if(d>0)
{float x2=(-b-sqrt(d))/(2*a);

float x1=(-b+sqrt(d))/(2*a);
cout<<“real and distinct”<<endl;

cout<<x2<<" "<<x1<<endl;

}
else if(d=0)
{
	
	cout<<"equal"<<endl;
	cout<<-b/2*a<<" "<<-b/2*a<<endl;
}
 else 
{
	
	cout<<"imajinary roots"<<endl;
}

}

@kailash_01
Problems I could find with your code :

  1. You are required to print the roots in increasing order. You have not implemented any check for that.
  2. The else if condition is wrong. It should be d==0.
  3. Stick to the specified output format. There are some spelling errors in your cout statements.
  4. Output should be an integer as specified in the problem statement.

stil 2 test cases not running

using namespace std;

#include
#include
int main()
{

float d,a,b,c;
cin>>a>>b>>c;
d=b*b-4*a*c;
if(d>0)
{
    float x2=(-b-sqrt(d))/(2*a);
     float x1=(-b+sqrt(d))/(2*a);

if(x1>=x2){
cout<<“real and distinct”<<endl;
cout<<x2<<" “<<x1<<endl;
}
else{
cout<<“real and distinct”<<endl;
cout<<x1<<” "<<x2<<endl;
}
}
else if(d==0)
{
cout<<“equal”<<endl;
cout<<-b/2a<<" "<<-b/2a<<endl;
}
else
{

	cout<<"imaginary roots"<<endl;
}

}