sir my code is not passing all the test cases ,could you please tell why
the code which i have written is:
#include
#include<math.h>
using namespace std;
int main()
{
int a,b,c;
float root1=0,root2=0,d=0;
cin>>a>>b>>c;
d=sqrt(pow(b,2)-4*(ac));
root1=(-b+d)/2a;
root2=(-b-d)/2*a;
if(d>0)
{
cout<<“Real and distinct”<<endl;
if(root1>root2)
{
cout<<root2<<" “;
cout<<root1;
}
else
{
cout<<root1;
cout<<root2;
}
}
else if(d=0)
{
cout<<” real and equal"<<endl;
cout<<root1;
}
else
{
cout<<"Roots are imaginary"<<endl;
}
return 0;
}