Revising Quadratic Equations,

According to me there are no bugs in y code for the input 1,1,1 as it is correctly printing Imaginary,plz check my code and revert, i will be grateful to you, thankz ,

#include
#include<math.h>

using namespace std;

int main()
{
int a,b,c,d;
float d1,x;
cin>>a>>b>>c;
d = ((bb)-(4ac));
d1 = pow(d,0.5);
if (d == 0)
{
cout<<“real and equal”;
x = (-b)/(2
a);
cout<<" “<<x<<” "<<x;
}
else if (d < 0)
{
cout<<"Imaginary ";
}
else
{
cout<<“real and distinct” ;
x = (-b+d1)/(2a);
cout<< " "<<x;
x = (-b-d1)/(2
a);
cout<< " "<<x;

}
return 0;

}

Hello @akb.tech17,

Share your code using Online Coding Blocks IDE.
The way you have share it, is introducing many syntax errors to it.

Steps:

  1. Paste your code on IDE.
  2. Save it there.
  3. Share the URL generated.

Waiting for your code.

Hello @akb.tech17,

As you have not replied to this thread since so long so i marking this as resolved.
BTW, here’s your corrected code.

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.