Can you please check the code it is passed in the two cases but not passed in 1 case

#include
#include <math.h>

using namespace std;

int main()
{

double a{0},b{0},c{0},discrim{0},root1{0},root2{0};
cin>>a>>b>>c;
discrim= (pow(b,2)-4*a*c);
if(discrim>0){

root1= floor((-b-sqrt(discrim))/(2a));
root2= floor((-b+sqrt(discrim))/(2
a));
cout<<“Real and Distinct”<<endl;
cout<<root1<<" “<<root2<<endl;
}
else if(discrim==0){
root1= floor((-b-sqrt(discrim))/(2a));
root2= floor((-b+sqrt(discrim))/(2
a));
cout<<“Equal”<<endl;
cout<<root1<<” "<<root2<<endl;
}
else{
cout<<“Imaginary”<<endl;
}
}

hey @Shubham_helloworld please share code through ide.codingblocks.com the code pasted here gets unindented and changes as well which makes it difficult to work with it.

@Shubham_helloworld the code that you have attached is not of revising quadratic equations

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.