#include<conio.h>
int main()
{
//*SOLVING QUARDRATIC EQUATION FOR "X"
int a,b,c,x1,x2,d;
cout<<"enter coefficients a,b and c";
cin>>a>>b>>c;
d=b*b-4*a*c;
if(d>0)
{
x1=(-b+sqrt(d))/(2*a);
x2=(-b-sqrt(d))/(2*a);
cout<<"two real solution."<<endl;
cout<<"x1="<<x1<<endl;
cout<<"x2="<<x2<<endl;
}
else if(d==0)
{
cout<<"one real solution."<<endl;
x1=(-b+sqrt(d))/(2*a);
cout<<"x1=x2"<<x1<<endl;
}
else
cout<<"no real solutions."<<endl;
getch();
return 0;
}