when i downloaded the test cases and made the first test case(which was repeatedly failing) my custom input, i got the correct answer. why was the first test case failing then?
here is the code:
#include
#include<math.h>
using namespace std;
int main()
{
double a,b,c,d,x1,x2;
cin>>a>>b>>c;
d=(bb-4ac);
if(d>0)
{
cout<<“Real and Distinct”<<endl;
x1=(-b+sqrt(bb-4ac))/(2a);
x2=(-b-sqrt(bb-4ac))/(2a);
cout<<x1<<" "<<x2;
}
if(d==0)
{
cout<<“Real and Equal”<<endl;
x1=x2=-b/(2a);
cout<<x1<<" "<<x2;
}
if(d<0)
cout<<“Imaginary”;
}