Revising quadratic equations issue

#include
#include
using namespace std;
int main() {
float a,b,c;
cin>>a>>b>>c;
float d=(bb-4ac);
if(d==0)
{
cout<<“real and equal roots”<<endl;
cout<<(-b+sqrt(d))/(2
a)<<endl;}
else if(d<0)
cout<<“imaginary roots”<<endl;
else
{
cout<<“real and unequal roots”<<endl;
cout<<(-b-sqrt(d))/(2a)<<" "<<(-b+sqrt(d))/(2a)<<endl;
}

return 0;

}
this code not passing testcases what is the issue with the code?

Hello @Rj.25,

Please share your code using coding blocks ide.
The way you have shared it have introduced many syntax errors to it.
STEPS:

  1. Paste it on https://ide.codingblocks.com/
  2. Save it there.
  3. Share the URL generated.

Now coming back to your code,

  1. make every variable of type int.
  2. The Output statements does not matches with the required statements.
    Correct sentences:
    “Real and Distinct”
    “Real and Equal”
    “Imaginary”
  3. for the case of equal roots, you have to print the roots twice separated by a space.

Hope, this would help.
Give a like if you are satisfied.

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.