In this question I am getting right answer but all the test cases are not passing. why?
Following is my code:
#include
#include<math.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
int d=bb-4ac;
int r1=(-b+sqrt(d))/2a;
int r2=(-b-sqrt(d))/2*a;
if(d>0){
cout<<“Real and Distinct”<<endl;
if(r1>r2){
cout<<r2<<" “<<r1;
}
else{
cout<<r1<<” “<<r2;
}
}
else if(d=0){
cout<<“Real and Equal”<<endl;
cout<<r1<<” "<<r2;
}
else{
cout<<“Imaginary”;
}
return 0;
}