if (a==0)
{
cout << "The answer is undefined. " << endl;
cin >> symbol;//Skip
Repeat = (symbol == 'Y' || symbol == 'y') ? true : false;//And again
}
if (disc > 0)
{
cout << "The discriminant is: " << disc << endl;
x1 = (-b +sqrt((b*b) -4*a*c))/2*a;
x2 = (-b -sqrt((b*b) -4*a*c))/2*a;
}
else if (disc ==0)
{
cout << "The discriminant is: " << disc << endl;
x1=x2 =(-1*b)/(2*a);
}
else
{
disc =-1*disc;
cout << "No answer. Discriminant is less than 0"<< endl;
cout << "Would you like to calculate anyway? (Y or N): ";//Skip
cin >> symbol;//Skip
Repeat = (symbol == 'Y' || symbol == 'y') ? true : false;//And again
cout << "Imaginary solution X1: " << x1 << endl;
cout << "Imaginary solution X2: " << x2 << endl;
cout << "Would you like to calculate again (Y or N): ";//Skip
cin >> symbol;//Skip
Repeat = (symbol == 'Y' || symbol == 'y') ? true : false;//And again