semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//************************************************************
//*9.14????????????                    ***********
//*?????  1100012844                          ***********
//*???2011.9.16                                 ***********
//*?????????,?????100??,??!      ***********
//************************************************************
int main()
{
	int n,k;                   //??n,k?????
	double a,b,c;              //??a,b,c???????
	double d,x1,x2,x3;         //??d,x1,x2,x3???????
	cin >> n;                  //??????n
	for (k=0;k<n;k++)          //for?????????
	{
	    cin >> a >> b >> c;    //??????a,b,c
		d = b*b-4*a*c;         //??????????d
		if (d>=0)              //?????????????0
		    if (d>0)           //???????0,???????
			{   x1 = (-b+sqrt(d))/(2*a);    //??????x1??
		        x2 = (-b-sqrt(d))/(2*a);    //??????x2??
                cout << fixed << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;    //??x1,x2??
			}
		    else               //??????0,???????
			{   x1 = (-b)/(2*a);    //??????????
		        cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;    //????
			}
		else                        //???????0,???????
		{       x3 = (-b)/(2*a);    //?????x3
			    x1 = sqrt(-d)/(2*a);    //?x1?????
				x2 = -sqrt(-d)/(2*a);    //?x2?????
                if (fabs(x3)<0.0000000001)    //???????
                    x3 = 0;
				cout << fixed << setprecision(5) << "x1=" << x3 << "+" << x1 << "i" << ";" 
					     << "x2=" << x3 << x2 << "i" << endl;
		}
    }
	return 0;
}
int main(){
  int n;
  cin >> n;
  double a,b,c,delta;
  for (int i=1; i<=n ;++i){
         cin >> a >> b >> c;
         delta = b*b - 4*a*c;
         if (delta == 0){
           cout << "x1=x2=";
           printf("%.5f", (-b)/(2*a));
           }
         if (delta > 0 ){
                     cout << "x1=";
                     printf("%.5f", (-b + sqrt(b*b-4*a*c))/(2*a)); 
                     cout << ";x2=";
                     printf("%.5f", (-b - sqrt(b*b-4*a*c))/(2*a));
                   }
         if (delta < 0){
                     delta = -delta;
                     double shi,xu;
                     shi = (-b)/(2*a); xu = (sqrt(delta))/(2*a);
                     if (shi == 0) shi=0; 
                     cout << "x1=";
                     printf("%.5f", shi);
                     cout << "+";
                     printf("%.5f", xu);
                     cout << "i;";
                     cout << "x2=";
                     printf("%.5f", shi);
                     cout << "-"; 
                     printf("%.5f", xu);
                     cout << "i" ;   
                   }
         cout << endl; 
      }
  return 0;
}
void main ()
{
int n, i;
double a, b, c, d, e;
scanf("%d", &n);
for(i=1;i<=n;i++)
{
scanf("%lf %lf %lf", &a, &b, &c);
if((b*b-4*a*c)<0)
{d=(-(b/(2*a)));
 e=(sqrt(-b*b+4*a*c))/(2*a);
 printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", d, e, d, e);}
else if((b*b-4*a*c)>=0)
{d=(-b+sqrt(b*b-4*a*c))/(2*a);
 e=(-b-sqrt(b*b-4*a*c))/(2*a);
if(d==e)
 printf("x1=x2=%.5f\n", d);
 else if(!(d==e))
	 printf("x1=%.5f;x2=%.5f\n", d, e);}
}
}
void main()
{
    double a,b,c,s;
    int n,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%lf%lf%lf",&a,&b,&c);
        s=b*b-4*a*c;
        if(s>0)
            printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a));
        else if(s==0)
        {
            printf("x1=x2=%.5f\n",-b/(2*a));
        }
        else if(s<0)
      {if(-b/(2*a)!=0)
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-(b*b-4*a*c))/(2*a),-b/(2*a),sqrt(-(b*b-4*a*c))/(2*a));
        else
             printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b/(2*a),sqrt(-(b*b-4*a*c))/(2*a),b/(2*a),sqrt(-(b*b-4*a*c))/(2*a));}
    }
}
int main()
{
	int n;
	cin >> n;
	double x1, x2, a, b, c, d;
	for (int i = 0; i < n; i++)
	{
	cin >> a >> b >> c;
	d = b * b - 4 * a * c;
	if(d == 0)
	{
		x1 = (-b + sqrt(d)) / (2 * a);
		if(x1 != 0.00000)
		    cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
		else
            cout << fixed << setprecision(5) << "x1=x2=" << "0.00000" << endl;
	}
	if(d > 0)
	{
		x1 = (-b + sqrt(d)) / (2 * a);
        x2 = (-b - sqrt(d)) / (2 * a);
		if (x1 != 0.00000 && x2 != 0.00000)
		    cout << fixed << setprecision(5) << "x1=" << x1 << ';' << "x2=" << x2 << endl;
		if (x1 != 0.00000 && x2 == 0.00000)
			cout << fixed << setprecision(5) << "x1=" << x1 << ';' << "x2=" << "0.00000" << endl;
		if (x1 == 0.00000 && x2 != 0.00000)
		    cout << fixed << setprecision(5) << "x1=" << "0.00000" << ';' << "x2=" << x2 << endl;
	}
	if(d < 0)
	{
		if ((-b) / (2 * a) != 0.00000)
		    cout << fixed << setprecision(5) 
			     << "x1=" << (-b) / (2 * a) << '+' << sqrt(fabs(d)) / (2 * a) << "i;"
			     << "x2=" << (-b) / (2 * a) << '-' << sqrt(fabs(d)) / (2 * a) << "i" << endl;
		else
			cout << fixed << setprecision(5) 
			     << "x1=" << "0.00000" << '+' << sqrt(fabs(d)) / (2 * a) << "i;"
			     << "x2=" << "0.00000" << '-' << sqrt(fabs(d)) / (2 * a) << "i" << endl;
	} 
	}
	return 0;
}
int main()
{
	int n,i;
	double a[100],b[100],c[100],x1,x2,p,q;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%lf%lf%lf",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		if(b[i]*b[i]-4*a[i]*c[i]>0)
		{
			x1=(-b[i] + sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]) ;
			x2=(-b[i] - sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]) ;
			printf("x1=%.5lf;x2=%.5lf\n", x1,x2);
		}
		if(b[i]*b[i]-4*a[i]*c[i]==0)
		{
			x1=(-b[i])/(2*a[i]) ;
			printf("x1=x2=%.5lf\n",x1);
		}
		if(b[i]*b[i]-4*a[i]*c[i]<0)
		{
			p=(-b[i])/(2*a[i]) ;
			q=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
			if(p==0)
			{
			printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",q,q);			
			}
			else
			{
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
			}
		}
	}
	return 0;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	float a[100],b[100],c[100];
	double x1,x2,m,p,q;
	for(i=0;i<n;i++){
        scanf("%f%f%f",&a[i],&b[i],&c[i]);
	}
        	for(i=0;i<n;i++){
        m = b[i]*b[i]-4*a[i]*c[i];
		if (m > 0){
			x1=(-b[i]+sqrt(m))/(2*a[i]);
		    x2=(-b[i]-sqrt(m))/(2*a[i]);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		    else if (m == 0){
			x1=-b[i]/(2*a[i]);
		    printf("x1=x2=%.5lf\n",x1);
			}
		        else if (m < 0){
                p=-b[i]/(2*a[i]);
		        q=sqrt(-m)/(2*a[i]);
		        printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
				}
	}
	return 0;
}
int main()

{

    int n,i;
    float a,b,c;
    double x1,x2,m;
    cin>>n;
    for(i=1;i<=n;i++)
    {
		cin>>a>>b>>c;
		m=-b/(2*a);
        if(b*b-4*a*c>0)
        {
            x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
            x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
            cout<<fixed<<setprecision(5)<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
        }
        else if(b*b-4*a*c<0)
        {
            if (m!=0)
			{
				cout<<fixed<<setprecision(5)<<"x1="
                <<-b/(2*a)<<"+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i;";
                cout<<fixed<<setprecision(5)<<"x2="
                <<-b/(2*a)<<"-"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<endl;
			}
			else
			{
				cout<<fixed<<setprecision(5)<<"x1="
                <<"0.00000+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i;";
                cout<<fixed<<setprecision(5)<<"x2="
                <<"0.00000-"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<endl;
			}
        }
        else 
        {
            x1 = x2 = -b/(2*a); 
            cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
        }
	}
    return 0;
}
void main()
{
	int n,i;
	double p,q,re,im,x1,x2,a,b,c;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		p=2*a;q=sqrt(b*b-4*a*c);
		if(fabs(q)<=1e-6)
		{
			x1=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else if(q>1e-6)
		{
			x1=(-b+q)/p;x2=(-b-q)/p;
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else
		{
			re=-b/p;im=sqrt(-b*b+4*a*c)/p;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",re,im,re,im);
		}
	}
}
int main()
{
    double a,b,c,x1,x2,n,m;
    scanf("%lf",&n);
    for(m=1;m<=n;m++)
    {
    scanf("%lf %lf %lf",&a,&b,&c);
    x1=(-b + sqrt(b*b-4*a*c))/(2*a),x2=(-b - sqrt(b*b-4*a*c))/(2*a);
    if(b*b-4*a*c>0)
        {
                   printf("x1=%.5lf;x2=%.5lf\n",((0-b) + sqrt(b*b-4*a*c))/(2*a),((0-b) - sqrt(b*b-4*a*c))/(2*a) ) ;
        }
    else if(b*b-4*a*c==0)
        {
                        printf("x1=x2=%.5lf\n",x1);
        }            
    else
        {
                     printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",((0-b))/(2*a),sqrt(4*a*c-b*b)/(2*a),((0-b))/(2*a),sqrt(4*a*c-b*b)/(2*a));
        }
    }                                           
    
}
int main()
{
    int n;
    double a , b ,c , x1 , x2 , t;
    cin>>n;
    while (n--)
    {
    cin>>a>>b>>c;
    cout<<setprecision(5)<<fixed;
    if (b * b - 4 * a * c >= 0)
        {
            x1 = (-b + sqrt(b * b - 4 * a * c)) / (2 * a);
            x2 = (-b - sqrt(b * b - 4 * a * c)) / (2 * a);
            if (x1 == x2)
                {
                    cout<<"x1=x2="<<x1<<endl;
                }
            if (x1 != x2)
                {
                    cout<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
                }
        }
    if  (b * b - 4 * a * c < 0)
        {
            t = -b/(2 * a);
            if (abs(t)<1e-6) t=abs(t);
            cout<<"x1="<<t<<"+"<<(sqrt(-b * b + 4 * a * c))/(2 * a)<<"i";
            cout<<";";
            cout<<"x2="<<t<<"-"<<(sqrt(-b * b + 4 * a * c))/(2 * a)<<"i"<<endl;
        }
    }
    return 0;
}
main()
{
    int n,k;
    double a[100],b[100],c[100],x1,x2,p,m,q;
    scanf("%d\n",&n);
    for(k=1;k<=n;k++)
    {
        scanf("%lf %lf %lf",&a[k],&b[k],&c[k]);
    }
    for(k=1;k<=n;k++)
    {
        p=b[k]*b[k]-4*a[k]*c[k];
        if(p==0)
        {
            if(b[k]==0)
        {
            m=0;
            printf("x1=x2=%.5f\n",m);

        }
        else
        {
            m=-b[k]/(2*a[k]);
            printf("x1=x2=%.5f\n",m);
        }
        }
    if(p>0)
    {
        x1=(-b[k]+sqrt(p))/(2*a[k]);
        x2=(-b[k]-sqrt(p))/(2*a[k]);
        printf("x1=%.5f;x2=%.5f\n",x1,x2);
    }
    if(p<0)
    {
        if(b[k]==0)
        {
            x1=sqrt(-p)/(2*a[k]);
            printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",x1,x1);
        }
        else
        {
            m=-b[k]/(2*a[k]);
            q=sqrt(-p)/(2*a[k]);
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",m,q,m,q);
        }
    }
    }
}
/*
 * practice.cpp
 *
 *  Created on: 2014-5-23
 *      Author: de
 */

int main(){
	double a,b,c,x1,x2,i;
	int cases;
	cin>>cases;
	for(int j=0;j<cases;j++){
		cin>>a>>b>>c;
		if(b*b-4*a*c>0){
			if(b==0){
				x1 = (sqrt(0-4*a*c))/(2*a);
				x2 = (0 - sqrt(0-4*a*c))/(2*a);
			}
			else
			{x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
			x2 = (-b - sqrt(b*b-4*a*c))/(2*a);}
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<";x2="<<x2<<endl;
		}
		if(b*b-4*a*c==0){
			if(b==0)x1=0.0;
			else x1 = (-b/(2*a));
			cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		}
		if(b*b-4*a*c<0){
			if(b==0){
				x1=0.0;
				i=sqrt(4*a*c)/(2*a);
			}
			else
			{x1 = (-b/(2*a));
			i=sqrt(4*a*c-b*b)/(2*a);}
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<"+"<<i<<"i;x2="<<x1<<"-"<<i<<"i"<<endl;
		}

	}
	return 0;
}
int main()
{
	int n;
	cin>>n;
	double a,b,c,delta,x1,x2,r,i;
	for(int p=1;p<=n;p++)
	{
		cin>>a>>b>>c;
		delta=b*b-4*a*c;
		if (delta>0)
		{
			x1=(-b+sqrt(delta))/(2*a);
			x2=(-b-sqrt(delta))/(2*a);
			cout<<"x1=";
			printf("%.5f", x1);
			cout<<";x2=";
			printf("%.5f\n",x2);
			cout<<endl;
		}
		else
		{
			if (delta==0)
			{
				x1=(-b)/(2*a);
				cout<<"x1=x2=";
				printf("%.5f", x1); 
				cout<<endl;
			}
			else
			{
				r=(-b)/(2*a);
				delta=-delta;
				i=(sqrt(delta))/(2*a);
				if (r==0)
				{
					r=abs(r);
				}
				cout<<"x1=";
				printf("%.5f",r);
				cout<<"+";
				printf("%.5f",i);
				cout<<"i;x2=";
				printf("%.5f",r);
				cout<<"-";
				printf("%.5f",i);
				cout<<"i"<<endl;
			}
		}
	}
	return 0;
}
int main()
{
	int n,k;
	cin>>n;
	for(k=1;k<=n;k++)
	{
		float a,b,c;
		double x1,x2;
		cin>>a>>b>>c;
		cout<<fixed;
		if((b*b-4*a*c)>0)
		{
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a) ;
			x2 = (-b - sqrt(b*b-4*a*c))/(2*a) ;
			if (fabs(x1) < 1e-5)
			{
				x1 = 0;
			}
			else if (fabs(x2) < 1e-5)
			{
				x2 = 0;
			}
			cout<<"x1="<<setprecision(5)<<x1<<";"<<"x2="<<setprecision(5)<<x2<<endl;
		}
		else if((b*b-4*a*c)==0)
		{
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a) ;
			if (fabs(x1) < 1e-5)
			{
				x1 = 0;
			}
			cout<<"x1=x2="<<setprecision(5)<<x1<<endl;
		}
	    else
		{
			double a1,b1;
			a1=(-b/(2*a));
			b1=(sqrt(4*a*c-b*b)/2/a);
			if(fabs( a1)<=1e-5)
			{
				a1=0;
			}
			else if(fabs(b1) < 1e-5)
			{
				b1=0;
		    }
			cout<<"x1="<<setprecision(5)<<a1<<"+"<<b1<<"i"<<";"<<"x2="<<setprecision(5)<<a1<<"-"<<b1<<"i"<<endl;
		}
	}
	return 0;
}
main()
{
	int j,n;
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		float a,b,c,x1,x2;
		scanf("%f %f %f",&a,&b,&c);
		if ((b*b-4*a*c)>0)
		  printf("x1=%.5f;x2=%.5f\n",(double)(-b+sqrt(b*b-4*a*c))/(2*a),(double)(-b-sqrt(b*b-4*a*c))/(2*a));
		if ((b*b-4*a*c)==0 )
		  printf("x1=x2=%.5f\n",-b/(2*a));
		if ((b*b-4*a*c)<0){
			if(b/(2*a)==0){
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b/(2*a),sqrt(-(b*b-4*a*c))/(2*a),b/(2*a),sqrt(-(b*b-4*a*c))/(2*a));
			}
			else
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-(b*b-4*a*c))/(2*a),-b/(2*a),sqrt(-(b*b-4*a*c))/(2*a));
		}
	}
}
int main()
{
    int n,j;
    double a,b,c;
    double x1,x2;
    double sb,xb;
    scanf("%d",&n);
    for (j=0;j<n;j++)
    {
        scanf("%lf %lf %lf",&a,&b,&c);
        if ((b*b-4.0*a*c)>0)
        {
            x1=(-b+sqrt(b*b-4.0*a*c))/(2.0*a);
            x2=(-b-sqrt(b*b-4.0*a*c))/(2.0*a);
            printf("x1=%.5lf;x2=%.5lf\n",x1+1e-6,x2+1e-6);
            }
        else if (fabs(b*b-4.0*a*c)<1e-8)
        {
            x1=-b/(2.0*a);
            printf("x1=x2=%.5lf\n",x1+1e-6);
            }
        else
        {
            sb=-b/(2.0*a);
            xb=sqrt(4.0*a*c-b*b)/(2.0*a);
            if (fabs(sb)<1e-8) sb=0;
            if (fabs(xb)<1e-8) xb=0;
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",sb,xb,sb,xb);
            }
        }
    return(0);
}
int main()
{
	int n,m;
	float a,b,c;
	double x1,x2;
	cin>>n;
	for(m=1;m<=n;m=m+1)
	{
		cin>>a>>b>>c;
	    x1=(-b+sqrt(b*b-4*a*c))/(2*a),x2=(-b-sqrt(b*b-4*a*c))/(2*a);
	if(b*b-4*a*c>0)
	{
		cout<<fixed<<setprecision(5)<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
	}
	else if(b*b-4*a*c<=0)
	{
		if(b*b-4*a*c==0)
		{
		cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		}
		else
		{
			cout<<fixed<<setprecision(5)<<"x1="<<-b/(2*a)+1-1<<"+"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<";"<<"x2="<<-b/(2*a)+1-1<<"-"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<endl;
		}
	}
	}
	return 0;
}
int main()
{
	int n,i;
	double a,b,c,x1,x2,d,e;
	scanf("%d",&n);
	
	for (i=0;i<n;i++){
		scanf("%lf %lf %lf",&a,&b,&c);
        d=b*b-4*a*c;
		if(d>0){
			x1=(-b+sqrt(d))/(2*a);
			x2=(-b-sqrt(d))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(d==0){
			x1=-b/2/a;
if(x1==-0)  x1 = 0;
			printf("x1=x2=%.5lf\n",x1);
		}
		else if(d<0){
			x1=-b/2/a;
                           if(x1==-0)  x1 = 0;
			e=sqrt(-d)/2/a;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,e,x1,e);
		}
	}
	return 0;
}
int main()
{
	int n,i;
	float a[100],b[100],c[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f%f%f",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++)
	{
		if(a[i]!=0)
		{
			double delta,m,n,x1,x2;
			delta=b[i]*b[i]-4*a[i]*c[i];
		if(b[i]==0)
			m=-0;
		else
			m=-(b[i]/(2*a[i]));
		n=sqrt(fabs(delta))/(2*a[i]);
		if(delta==0)
		{
			printf("x1=x2=%.5lf\n",m);
		}
		else if(delta>0)
		{
			x1=m+n;
			x2=m-n;
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(delta<0&&b[i]==0)
		{
			m=-0.00000;
			printf("x1=%.5lf+%.5lfi;",m,n);
			printf("x2=%.5lf-%.5lfi\n",m,n);
		}
		else
		{
			printf("x1=%.5lf+%.5lfi;",m,n);
			printf("x2=%.5lf-%.5lfi\n",m,n);
		}
		}
	}
	return 0;
}
void main()
{
  int n;
  double a,b,c,x1,x2,a1,b1;
  scanf("%d\n", &n);
  
  while(n!=0)
  {
   scanf("%lf %lf %lf", &a,&b,&c);
   
   if((b*b-4*a*c)>0) 
   {
   x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
   x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
   printf("x1=%.5lf;x2=%.5lf\n", x1,x2);
   }

   else if((b*b-4*a*c)==0)
   {
   x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
   x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
   printf("x1=x2=%.5lf\n",x1);
   }

   else if((b*b-4*a*c)<0)
   {
   a1=-b/(2*a);
   b1=sqrt(4*a*c-b*b)/(2*a);
   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", a1,b1,a1,b1);
   }
   
   n=n-1;
  }
}
void main ()
{
int n,i;
double a,b,c,x1,x2,p=0.000001;
scanf("%d",&n);
for (i=0;i<n;i++)
{
    scanf("%lf %lf %lf",&a,&b,&c);
    if (b*b-4*a*c<-p)
    {
        x1=-b/(2*a);x2=sqrt(-b*b+4*a*c)/(2*a);
        if (x1>-p&&x1<p) x1=0;
        if (x2>-p&&x2<p) x2=0;
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);
    }
    else
    {
        x1=(-b+sqrt(b*b-4*a*c))/(2*a);
        x2=(-b-sqrt(b*b-4*a*c))/(2*a);
        if (x1>-p&&x1<p) x1=0;
        if (x2>-p&&x2<p) x2=0;
        if (b*b-4*a*c<p&&b*b-4*a*c>-p)
        printf("x1=x2=%.5f\n",x1);
        else
        printf("x1=%.5f;x2=%.5f\n",x1,x2);
    }
}

}
main()
{
int i, n;
float a,b,c;
scanf("%d",&n);
double d[n][3],x,y;
for(i=0;i<n;i++)
  {
     scanf("%f %f %f",&a,&b,&c);
      x=b*b-4*a*c;
    if(x==0)
         {
            d[i][1]=d[i][2]=-b/(2*a);
            d[i][3]=x;
          }
    else if(x>0)
        {     
          y=sqrt(x);
          d[i][1]=(-b+y)/(2*a); 
          d[i][2]=(-b-y)/(2*a);
          d[i][3]=x;
         }
    else
         {
           y=sqrt(-x);
           d[i][1]=-b/(2*a);
           d[i][2]=y/(2*a); 
           d[i][3]=x;
          }
   }
 for(i=0;i<n;i++)
   {
   if(d[i][1]==-0)
   d[i][1]=0;
   if(d[i][2]==-0)
   d[i][2]=0;
     if(d[i][3]<0)
       printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d[i][1],d[i][2],d[i][1],d[i][2]);
     else if(d[i][3]>0)
          printf("x1=%.5f;x2=%.5f\n",d[i][1],d[i][2]);
     else
          printf("x1=x2=%.5f\n",d[i][1]);
    }
}
/*
 * ????????.cpp
 *
 *  Created on: 2012-10-14
 *      Author: Administrator
 */

int main()
{
	int n,i;
	float a[100],b[100],c[100];
	double x1,x2,delta,x;
	cin >> n;
	for (i=1;i<=n;i++)
	{
		cin >> a[i] >> b[i] >> c[i];
	}
	for (i=1;i<=n;i++)
	{
		cout << fixed << setprecision(5);
		{
		    delta=b[i]*b[i]-4*a[i]*c[i];
		    x1=(-b[i] + sqrt(delta))/(2*a[i]);
		    x2=(-b[i] - sqrt(delta))/(2*a[i]);
		    if (delta==0)
		    {
		         cout << "x1=x2=" << x1 << endl;
		    }
		   if (delta>0)
		    {
			    cout << "x1=" << x1 << ";" << "x2=" << x2 <<endl;
		    }
	       if (delta<0)
		    {
			    x=(sqrt(-delta))/(2*a[i]);
			    cout << "x1=" << (-b[i]/(2*a[i])==0?b[i]/(2*a[i]):-b[i]/(2*a[i])) <<"+" << x << "i" <<";" << "x2=" << (-b[i]/(2*a[i])==0?b[i]/(2*a[i]):-b[i]/(2*a[i])) <<"-" << x << "i" <<endl;
		    }

		}

	}
	return 0;


}
/*
 * g9.cpp
 *?????????
 *  Created on: 2012-10-10
 *      Author: ???
 */
int main()
{
	double a,b,c;
	int n;//????
	cin>>n;
	for(int i=1;i<=n;i++)//????
	{
		cin>>a>>b>>c;//??
		double d=b*b-4*a*c;//??????
		if(d>0)//??if??
			{double x1,x2 ;
		x1=(-b + sqrt(d))/(2*a);
		x2 = (-b - sqrt(d))/(2*a);

		cout<<fixed<<setprecision(5)<<"x1="<<x1<<";"<<"x2="<<x2<<endl;}//??????0?

		 if(d==0)
			{double x1,x2;
		x1=-b/(2*a);
		x2=x1;
		cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;}//????=0?
		 if(d<0)
		 {
			 d=-d;
			 if(b!=0)
				 cout<<fixed<<setprecision(5)<<"x1="<<(-b)/(2*a)<<"+"<<sqrt(d)/(2*a)
							<<"i"<<";"<<"x2="<<(-b)/(2*a)<<"-"<<sqrt(d)/(2*a)<<"i"<<endl;
		else
		cout<<fixed<<setprecision(5)<<"x1="<<b<<"+"<<sqrt(d)/(2*a)<<"i"<<";"<<"x2="<<b<<"-"<<sqrt(d)/(2*a)<<"i"<<endl;
		 }

	}//??????0?
	return 0;
}
//****************************************
//*?????(8.3) ????????? (1051)       
//*????? 1100012996       **
//*???2011.9.14                         
//****************************************
int main()
{
	int n;//n????
	cin>>n;
	double a,b,c;//a?b?c???
	for (int i=0;i<n;i++)
	{
		double x1,x2;
		cin>>a>>b>>c;
		double dot = b*b - 4*a*c;//???b^2-4ac??
		//?????????????????
		if (dot==0)
		{
			x1 = x2 = - b / ( 2 * a );
			cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		} 
		else
		{
			if (dot>0)
			{
				x1 = (-b + sqrt(dot))/(2*a) ;
				x2 = (-b - sqrt(dot))/(2*a) ;
				cout<<fixed<<setprecision(5)<<"x1="<<x1<<";x2="<<x2<<endl;
			} 
			else
			{
				if (-b/(2*a)!=0)
				//????????-0.00000?????
				{
					cout<<fixed<<setprecision(5)<<"x1="<<-b/(2*a)<<"+"<<sqrt(-dot)/(2*a)
						<<"i;x2="<<-b/(2*a)<<"-"<<sqrt(-dot)/(2*a)<<"i"<<endl;
				} 
				else
				{
					cout<<fixed<<setprecision(5)<<"x1="<<b/(2*a)<<"+"<<sqrt(-dot)/(2*a)
						<<"i;x2="<<b/(2*a)<<"-"<<sqrt(-dot)/(2*a)<<"i"<<endl;
				}
				
			}
		}

	}



	return 0;

}
int main()
{
    int n=0;
	int i=0;
	double a=0;
	double b=0;
	double c=0;
	double pan=0;
	double x1=0;
	double x2=0;
	double y=0;
	
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		pan=b*b-4*a*c;
		if(pan>0)
		{
			x1=(-b + sqrt(pan))/(2*a);
			x2=(-b - sqrt(pan))/(2*a);
			printf("x1=%.5f",x1 );
			printf(";x2=%.5f\n", x2);
		}
		else if(pan==0)
		{
			x1=(-b)/(2*a);
			x2=x1;
			printf("x1=x2=%.5f\n",x1 );
		}
		else
		{
			x1=(-b)/(2*a);
			if(x1==0)
			{
				x1=-x1;
			}
			y=sqrt(-pan);
			
			printf("x1=%.5f",x1 );
			printf("+%.5f",y /(2*a));
			printf("i;");
			printf("x2=%.5f",x1 );
			printf("%.5f",-(y/(2*a)));
			printf("i\n" );
			
		}
	}
	
	return 0;
}
//*4.cpp???e??  **
//*????? 1300012896 **
//*???2013.10.9 *
//********************************




int main()
{
    int n, k;
    double a, b, c, x1, x2, D, d, e;
    cin >> n ;
    for (k = 1; k <= n; k++)
        {cin >> a >> b >> c;
        D = b * b - 4 * a * c;
        if (b != 0)
            b = -b;
        if (D > 0)
           {x1 = (double)(b + sqrt(D))/(2 * a);
            x2 = (double)(b - sqrt(D))/(2 * a);
            cout << fixed;
            cout << "x1=" << setprecision(5) << x1 << ";" << "x2=" << x2 << endl;}
        else if (D < 0)
           {d = (double)(b) / (2 * a);
            e = (double)sqrt (-D) / (2 * a);
            cout << "x1=" << setprecision(5) << d << "+" << e << "i"<< ";" <<"x2=" << d << "-" << e << "i"<< endl;}
        
        else
             {x1 = (double)(b + sqrt(D))/(2 * a);
            cout << fixed;
            cout << "x1=x2=" << setprecision(5) << x1 << endl;}

        }
    return 0;
}
main()
{
 float x[100][3],a,b,c,d;
 int i,n;
 double x1,x2;
 scanf("%d",&n);
 for(i=1;i<=n;i++)
 {
   scanf("%f%f%f",&x[i][1],&x[i][2],&x[i][3]);                 
 }    
 for(i=1;i<=n;i++)
 {
   a=x[i][1];
   b=x[i][2];
   c=x[i][3];
   d=b*b-4*a*c;
   if(d>0 && c==0)  
     printf("x1=%.5f;x2=%.5f\n",c,(-b-sqrt(d))/(2*a)); 
   if(d>0 && c!=0)  
     printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(d))/(2*a),(-b-sqrt(d))/(2*a)); 
   if(d==0)
     printf("x1=x2=%.5f\n",(-b+sqrt(d))/(2*a)); 
   if(d<0 && b==0)
     printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,sqrt(-d)/(2*a),b,sqrt(-d)/(2*a));
     if(d<0 && b!=0)
     printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(a*2),sqrt(-d)/(2*a),-b/(2*a),sqrt(-d)/(2*a));                     
 }  
}
int main()
{
	int n,k,j;
    double a[100],b[100],c[100],p=0.00,q=0.00,m=0.00;
	scanf("%d",&n);
	for(k=0;k<n;k++)
	{scanf("%lf%lf%lf/n",&a[k],&b[k],&c[k]);}
	for(j=0;j<n;j++)
	{
		m=b[j]*b[j]-4*a[j]*c[j];
		p=-b[j]/(2*a[j]);
	   if(p==-0)
		p=0.00000;
		if(m<0){
        q=sqrt(-m)/(2*a[j]);
		printf("x1=%.5lf+%.5lfi;x2=%.5f-%.5fi\n",p,q,p,q);}
		if(m==0){
		printf("x1=x2=%.5f\n",p);}
		if(m>0){
			q=sqrt(m)/(2*a[j]);
     	printf("x1=%.5f;x2=%.5f\n",p+q,p-q);}
	}
	return 0;
}
void main()
{
	void d(double a,double b,double c);
	int n,i;
	double a,b,c;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
	    d(a,b,c);
	}      
}
void d(double a,double b,double c)
{
	double x1,x2;
	if((b*b-4*a*c)>0)
	{
		x1=(-b+sqrt(b*b-4*a*c))/(2*a);
        x2=(-b-sqrt(b*b-4*a*c))/(2*a);
	    printf("x1=%.5lf;",x1);
		printf("x2=%.5lf\n",x2);
	}
	else if((b*b-4*a*c)==0)
	{
        x1=x2=-b/(2*a);
		printf("x1=x2=%.5lf\n",x1);
	}
	else
	{
	    x1=-b/(2*a);
		x2=sqrt(4*a*c-b*b)/(2*a);
		printf("x1=%.5lf+%.5lfi;",x1,x2);
		printf("x2=%.5lf-%.5lfi\n",x1,x2);
	}
}