Quadratic Equtions

Given coefficients of a quadratic equation , you need to print the nature of the roots (real and distinct , real and equal , imaginary).
why 2 test cases are failing

#include
#include<math.h>
using namespace std;
int main()
{
int a;
int b;
int c;
cin>>a>>b>>c;
float x;
float y;
float t=sqrt(((bb)-(4ac)));
if(t<0)
cout<<“Imaginary”;
else
{
float t1;
float t2;
t1=(-(t+b)/(2
a));
t2=((t-b)/(2*a));
if(t1!=t2)
{
cout<<“Real and Distinct”<<endl;
cout<<t1<<" "<<t2;
}
else
{
cout<<“Real and Equal”<<endl;
cout<<t1;
}
}
return 0;
}

For imaginary, you are Supposed to check whether bb-4a*c is negative and not sqrt of this.

While checking imaginary, you are doing square root of negative number which is not allowed, hence it would give run time error…