Quadratic equation

#include
#include
using namespace std;

int main(){

float a,b,c;
 cin>>a;
 cin>>b;
 cin>>c;
	float d=(b*b)-(4*a*c);
	float D=sqrt(d);
	if(d>0){
		int r1=(D-b)/(2*a);
		int r2=(-D-b)/(2*a);
		cout<<"real and distinct"<<endl;
		if (r1>r2)
		{
			cout<<r2<<' '<<r1;
		}
		else{
			cout<<r1<<' '<<r2;
		}
		
	}
	else if(d==0){
		int r=(-b)/(2*a);
		cout<<"real and equal"<<endl;
		cout<<r<<' '<<r;
	}
	else if (d<0){
		cout<<"imaginary"<<endl;
	}

return 0;
}
//test cases not running

HI @srivastavaayush1611_3fd51b257da0b834 use int ans R is capital in real same for I in imaginary and D in distinct and E in equal

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.