Why my code gets an error in some test cases

#include
#include<math.h>
using namespace std;
int main(){
double a ;
cin>> a ;
double b;
cin>> b;
double c;
cin>> c;
double x,y; //roots of equation
x = (-b-sqrt((bb)-4ac))/2a;
y = (-b+sqrt((bb)-4ac))/2a;
if(x == y){cout<<“real and equal”<<endl;}
else{cout<<“real and distinct”<<endl;}
cout<<y<<" ";
cout<<x<<endl;

return 0;

}

You should only print x and y if they exist…ie that should also be in the if statement

@taran9873 also include imaginary case condition and next time please save code on ide it will better to resolve your doubts