#include
#include
using namespace std;
int main() {
float a, b, c, x1, x2, discriminant;
cout << "Enter coefficients a, b and c: ";
cin >> a >> b >> c;
discriminant = bb - 4ac;
if(a<=-100|| 100<=a||a==0||b<=-100|| 100<=b||c<=-100|| 100<=c)
cout<<“invalid”;
else
{
if (discriminant > 0) {
x1 = (-b + sqrt(discriminant)) / (2a);
x2 = (-b - sqrt(discriminant)) / (2*a);
cout << “Roots are real and different.” << endl;
cout << x1 << endl;
cout << x2 << endl;
}
else if (discriminant == 0)
{
cout << "Roots are real and same." << endl;
x1 = (-b + sqrt(discriminant)) / (2*a);
cout << x1 << endl;
}
else
{
cout << "Roots are complex and different." << endl;
}
}
return 0;
}