#include <iostream>
#include <cmath>
using namespace std;
int main()
{void low_zero();
float high_zero(float,float,float);
float equal_zero(float,float,float);
float a,b,c,x,i;
cout<<"please enter a,b,c:"<<endl;
cin>>a>>b>>c;
i=b*b-4*a*c;
if(a==0)
{x=-(c/b) ;
cout<<"x="<<x<<endl;}
else if(i<0) low_zero();
else if(i>0) cout<<"x1="<< -(2*a/b)+high_zero(a,b,c)<<", "<<"x2="<<-(2*a/b)-high_zero(a,b,c)<<endl;
else cout<<"x1=x2="<<-(2*a/b)+high_zero(a,b,c)<<endl;
return 0;
}
void low_zero()
{cout<<"no root!"<<endl;
}
float high_zero(float a,float b,float c)
{float i;i=(sqrt(b*b-4*a*c))/2*a;
return i;
}
float equal_zero(float a,float b,float c)
{float i;i=(sqrt(b*b-4*a*c))/2*a;
return i;
}