semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//*******************************
//**6.cpp?????????***
//**??????1300012993****
//**??:2013.10.10****
//*******************************
int main()
{
    int n;
    double a, b, c, x1, x2, d, p, q;
    char i;
    cin >> n;
    for(i = 1; i <= n; i++)
    {
        cin >> a >> b >> c;
        d = b * b - 4 * a * c;    //???????
        if(d > 0)                 //d??0,???????
           {if(b != 0)            //b??0??????????-0
                {
                    b = -b;
                }
            x1 = (b + sqrt(d)) / (2 * a); //?????
            x2 = (b - sqrt(d)) / (2 * a);
            cout << fixed;
            cout << "x1=" << setprecision(5) << x1 << ";"; //???????????
            cout << "x2=" << setprecision(5) << x2 << endl;}
        else
            if(d < 0)                           //?????
            {  if(b != 0)                       //????-0
                {
                    b = -b;
                }
             p = b / (2 * a);                   //????
             q = sqrt(-d) / (2 * a);            //?????????
             cout << fixed;
             cout << "x1=" << setprecision(5) << p; //??????
             cout << "+" << setprecision(5) << q;
             cout << 'i' << ";" << "x2=" << setprecision(5) << p;
             cout << "-" << setprecision(5) << q << 'i' << endl;
             }
            else                               //????????d??0??????
           {if(b != 0)
                {
                    b = -b;                    //????-0
                }
            x1 = b / (2 * a);                  //????????
            x2 = b / (2 * a);
            cout << "x1=x2=";
            cout << fixed;
            cout << setprecision(5) << x1 << endl;} //????

    }
    return 0;
}
main()
{
                int i,n;
                double a[100],b[100],c[100],d[100],x[100],y[100];
                scanf("%d",&n);
                i=0;
                for(i=0;i<n;i++)
                {
                          scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
                }
                i=0;
                while(i<n)
                {
                          if(b[i]*b[i]-4*a[i]*c[i]>=0)
                          {
                          x[i]=(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
                          y[i]=(-b[i]-sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
                          if(x[i]==y[i])
                          printf("x1=x2=%.5lf\n",x[i]);
                          else printf("x1=%.5lf;x2=%.5lf\n",x[i],y[i]);
                          }
                          else
                          {
if(b[i]==0)
{
                              d[i]=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
                              x[i]=b[i]/(2*a[i]);
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x[i],d[i],x[i],d[i]);
}
else
{
d[i]=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
                              x[i]=-b[i]/(2*a[i]);
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x[i],d[i],x[i],d[i]);
}
                      }
                          i=i+1;
                }
}
int main()
{
int n,i;
double a,b,c,x1,x2,s,t;
scanf("%d\n",&n);
for(i=1;i<=n;i++)
{
	scanf("%lf%lf%lf\n",&a,&b,&c);
if(b*b-4*a*c==0)
{
x1=(-b+sqrt(b*b-4*a*c))/(2*a);
printf("x1=x2=%.5f\n",x1);
}
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=%.5f;x2=%.5f\n",x1,x2);
}
if(b*b-4*a*c<0)
{
s=(sqrt(4*a*c-b*b))/(2*a);
t=((-1.0)*b)/(2*a);
if(t!=0)
{
printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",t,s,t,s);
}
if(t==0)
{
printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",s,s);
}
}
}
}
int main(int argc, char* argv[])
{
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{

		double a,b,c,d;
		scanf("%lf%lf%lf",&a,&b,&c);
		d=b*b-4*a*c;
                   if (b==0)
                   {
                       b=(-1)*b;
                    }
		if (d==0)
		{
			printf("x1=x2=%.5lf\n",(-1)*b/(2*a));
		}
		else if (d>0)
		{
			printf("x1=%.5lf;x2=%.5lf\n",((-1)*b+sqrt(d))/(2*a),((-1)*b-sqrt(d))/(2*a));
		}
		else if (d<0)
		{
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(-1)*b/(2*a),sqrt((-1)*d)/(2*a),(-1)*b/(2*a),sqrt((-1)*d)/(2*a));
		}
	}
	
	return 0;
}
int main()
{
	int n,i,j;
	double a[100][3],t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(j=0;j<3;j++)
		{
			scanf("%lf",&a[i][j]);
		}
	}
	for(i=0;i<n;i++)
	{
		t=-a[i][1]/(2*a[i][0]);
		if(a[i][1]==0.0) t=0;
		if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]==0)
			printf("x1=x2=%.5lf\n",t);
        else if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]>0)
			printf("x1=%.5lf;x2=%.5lf\n",(-a[i][1]+sqrt(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]))/(2*a[i][0]),(-a[i][1]-sqrt(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]))/(2*a[i][0]));
		else if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]<0)
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",t,sqrt(4*a[i][0]*a[i][2]-a[i][1]*a[i][1])/(2*a[i][0]),t,sqrt(4*a[i][0]*a[i][2]-a[i][1]*a[i][1])/(2*a[i][0]));
	}
	return 0;
}
/*
 * ????1089.cpp
 * ??????
 * ????: 2012-10-8
 * ??:???????????????
 */

int main(){
	int n;
	double a=0,b=0,c=0,delta=0,x1=0,x2=0,x=0;               //a,b,c?????????????x???????????
	cin >> n;
	while(n--){                                             //????
		cin >> a >> b >> c;
		delta=b*b-4*a*c;
		if (delta>=0){                                 //????????
			if (delta>0){
				x1=(-b + sqrt(delta))/(2*a);
				x2=(-b - sqrt(delta))/(2*a);
				if (x1==0) x1=0;                			//????"-0"???
				if (x2==0) x2=0;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);  		//?printf??????5???
			} else {
				x1=(-b)/(2*a);
				if (x1==0) x1=0;
				printf("x1=x2=%.5f\n", x1);
			}
	    }else {
	    	x1=(-b)/(2*a);              //???
	    	x=sqrt(-delta)/(2*a);       //???
	    	if (x1==0) x1=0;
            if (x==0) x=0;
	    	printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x,x1,x);
	    }
	}
	return 0;
}
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
double a,b,c;
cin>>a>>b>>c;
double d=b*b-4*a*c;
if(abs(d)<1e-8)d=0;
double e=-b/2/a;
if(abs(e)<1e-8)e=0;
if(abs(d)<1e-8)printf("x1=x2=%.5f",e);
else if(d>0)printf("x1=%.5f;x2=%.5f",e+sqrt(d)/2/a,e-sqrt(d)/2/a);
else {
d=abs(d);
if(a>0)
printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",e,sqrt(d)/2/a,e,sqrt(d)/2/a);
else printf("x1=%.5f-%.5fi;x2=%.5f+%.5fi",e,-sqrt(d)/2/a,e,-sqrt(d)/2/a);
}
cout<<endl;
}
return 0;
}
int main(){
	double a,b,c;
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
	if(b!=0){
		if(b*b-4.0*a*c==0){
			printf("x1=x2=%.5lf\n",(double)(-b/(2*a)));
			}else{
			if(b*b-4.0*a*c>0) printf("x1=%.5lf;x2=%.5lf\n",(-1.0*b+sqrt(b*b-4*a*c))/(2.0*a),(-1.0*b-sqrt(b*b-4*a*c))/(2.0*a));
			else  printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-1.0*b/(2.0*a),sqrt(abs(b*b-4*a*c))/(2.0*a),-1.0*b/(2.0*a),sqrt(abs(b*b-4*a*c))/(2.0*a));
			}
		}else{
			if(b*b-4.0*a*c==0){
			printf("x1=x2=%.5lf\n",(double)0.00000);
			}else{
			if(b*b-4.0*a*c>0) printf("x1=%.5lf;x2=%.5lf\n",(sqrt(b*b-4*a*c))/(2.0*a),(sqrt(b*b-4*a*c))/(2.0*a));
			else  printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",sqrt(abs(b*b-4*a*c))/(2.0*a),sqrt(abs(b*b-4*a*c))/(2.0*a));
			}
			}
		}
	return 0;
	}
void main()
{
 int n,i;
 float a,b,c,r,s,x1;
 scanf("%d",&n);
 for(i=1;i<=n;i++)
  {
   scanf("%f %f %f",&a,&b,&c);
   r=(b*b-4*a*c);
   s=-(b)/(2*a);
   if(fabs(s)<0.00001) s=0;
   x1=(-b+sqrt(r))/(2*a);
   if(fabs(x1)<0.00001) x1=0;
   if(r>0.00001) printf("x1=%.5f;x2=%.5f",x1,(-b-sqrt(r))/(2*a));
    else if(fabs(r)<0.00001) printf("x1=x2=%.5f",s);
          else if(a>0) printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",s,(sqrt(-r))/(2*a),s,(sqrt(-r))/(2*a));
          else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",s,-(sqrt(-r))/(2*a),s,-(sqrt(-r))/(2*a));
   printf("\n");}
}
int main()
{
	int n,i;
	double delta,x1,x2,re,im1,im2;
    scanf("%d",&n); 
    float a[n],b[n],c[n];
    for(i=1;i<=n;i++)
		scanf("%f%f%f",&a[i],&b[i],&c[i]);
	for(i=1;i<=n;i++)
	{
		#define a a[i]
		#define b b[i]
		#define c c[i]
        delta=b*b-4*a*c;
        if (delta>0)
		{
			x1=(-b + sqrt(delta))/(2*a);
            x2=(-b - sqrt(delta))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		if (delta==0)
		{	
			x1=-b/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		if (delta<0)
		{
			re=-b/(2*a);
            if (re==-0)
				re=0;
			im1=sqrt(-delta)/(2*a);
			im2=-im1;
			if (im1>0)
			   printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",re,im1,re,im1);
		}
	}
	
	return 0;
}
main()
{
  int n,i;
  double a,b,c,p,q,d;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
    scanf("%lf%lf%lf",&a,&b,&c);
    d=b*b-4.0*a*c;
    if(d>=0)
    {
      q=sqrt(d)/(2.0*a);
      p=-b/(2.0*a);
      if(q-0>=0.00001) printf("x1=%.5f;x2=%.5f\n",p+q,p-q);
      else 
        if(p<0.00001&&p>-0.00001) printf("x1=x2=0.00000\n");
        else printf("x1=x2=%.5f\n",p);
    }
    else 
    {
      q=sqrt(-d)/(2.0*a);
      p=-b/(2.0*a);
      if(p<0.00001&&p>-0.00001) printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",q,q);
      else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
    }
  }
}
int main()
{
	int n,i;
	double a,b,c,x1,x2,f,g;
	cin>>n;
	cout<<fixed;
	for(i=1;i<=n;i=i+1)
	{
		cin>>a>>b>>c;
		f=-b/(2*a);
	    g=sqrt(4*a*c-b*b)/(2*a);
		if(f==-0)
		{
			f=-f;
		}
		if((b*b-4*a*c)<0)
		{
			cout<<setprecision(5)<<"x1="<<f<<"+"<<g<<"i"<<";"<<"x2="<<f<<"-"<<g<<"i"<<endl;
		}
		else if((b*b-4*a*c)==0)
		{
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
		    cout<<setprecision(5)<<"x1=x2="<<x1<<endl;
		}
		else
		{
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
		    x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			cout<<setprecision(5)<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
		}
	}
	return 0;
}
main()
{
      int n,i;
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
             double ai,bi,ci,di,ei,fi,gi,x1i,x2i;
             scanf("%lf %lf %lf",&ai,&bi,&ci);

             di=bi*bi-4*ai*ci ;

             if(di>0)
                 {
                    gi= sqrt(di);
                    x1i=(-bi+gi)/(2*ai);
                    x2i=(-bi-gi)/(2*ai);
                    printf("x1=%.5lf;x2=%.5lf\n",x1i,x2i);
                 }
             else if(di==0)
                  {
                     x1i=x2i=(-bi)/(2*ai);
                     printf("x1=x2=%.5lf\n",x1i);
                  }
             else if(di<0)
                  {
                     gi=sqrt(-di) ;
                     if(bi==0) ei=bi/(2*ai);
                     else
                     {
                         ei=-bi/(2*ai);
                     }
                     fi=(gi)/(2*ai);
                     printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",ei,fi,ei,fi);
                  }
         }
         
}
/*
 * ?????????????.cpp
 * ?????
 * ????: 2012-10-10
 * ????????????
 */
int main(){                                                  //?????
	double a=0.0,b=0.0,c=0.0,x1=0.0,x2=0.0,x3=0.0;    //????????a,b,c,x1,x2,x3,x4
	int n=1,n1=1;                                           //????n,n1
	cin>>n;                                                  //??n
	while (cin>>a>>b>>c,n1<=n)                                //????
    	{
		if ((b*b-4*a*c)>0)                                  //????
		{
			x1=(-1*b + sqrt(b*b-4*a*c))/(2*a);              //??x1
       	    x2=(-1*b - sqrt(b*b-4*a*c))/(2*a);              //??x2
       	    printf("x1=%.5f", x1);                          //?x1?????????
       	    cout<<";";                                     //????
       	    printf("x2=%.5f", x2);                          //?x2?????????
       	    cout<<endl;
		}
		else if((b*b-4*a*c)==0.0)                              //????
		{
			if((-1*b)/(2*a)==0)                              //????
				cout<<"x1=x2="<<0<<endl;                         //??0
			else
			    {x1=(-1*b)/(2*a);                               //??x1?x2
			    printf("x1=x2=%.5f",x1);                       //??x1?x2
			    cout<<endl;}
		}
       	else                                                 //????
       	{
       		x3=sqrt(-(b*b-4*a*c))/(2*a);                          //??x1?x2???
            if((-1*b)/(2*a)==0)                                    //????
       		    {
            	x1=0.0;
            	printf("x1=%.5f",x1);                           //??x1???
            	printf("+%.5f",x3);
       			cout<<"i"<<";";                               //??i
       			printf("x2=%.5f", x1);                        //??x2???
       			printf("-%.5f", x3);
       			cout<<"i"<<endl;                                //??i
       			}
       		else                                               //????
       			{x1=(-1*b)/(2*a);                              //??x1,x2???
		        printf("x1=%.5f", x1);                        //??x1???
		        printf("+%.5f",x3);                           //??x???
		        cout<<"i"<<";";                               //??i???
		        printf("x2=%.5f", x1);                        //??x2???
		        printf("-%.5f",x3);                           //??x2???
		        cout<<"i"<<endl;}                       //??i
       	}
       	n1++;                                               //n1??
        }
	return 0;
}                                                           //?????
int main()
{
    int n,j;
	double a[100],b[100],c[100],x1,x2,t;
	double u,v;
	scanf("%d",&n);
	for(j=0;j<n;j++){
		scanf("%lf%lf%lf",&a[j],&b[j],&c[j]);
	}
	for(j=0;j<n;j++){
		t=b[j]*b[j]-4*a[j]*c[j];
		if(t>0){
			x1=(-b[j] + sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
			x2=(-b[j] - sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		if(t==0){
			x1=(-b[j] + sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
			x2=(-b[j] - sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
			printf("x1=x2=%.5lf\n",x1);
		}
		if(t<0){
			u=-b[j]/(2*a[j]);
			v=sqrt(-(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",u,v,u,v);
		}
	}
return 0;
}
main()
{   int n,k;
	double x1,x2,a,b,c,d,e;
	scanf("%d",&n);
	k=1;
	do{scanf("%lf%lf%lf",&a,&b,&c);
	d=b*b-4*a*c;
	if(d>=0)
	{if(d>0)
	{x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
    x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
	printf("x1=%.5f;x2=%.5f\n",x1,x2);
	k=k+1;}
	else
	    {
	    printf("x1=x2=%.5f\n",-b/(2*a));
		k=k+1;}
		}
		else
		{if(b==0)
		printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",sqrt(-b*b+4*a*c)/(2*a),sqrt(-b*b+4*a*c)/(2*a));
		else
		{	e=(-b)/(2*a);
		printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,sqrt(-b*b+4*a*c)/(2*a),e,sqrt(-b*b+4*a*c)/(2*a));
		}k=k+1;}
}while(k<=n)	; 
}
//****************************
//**Title:?????????**
//**Author:???1300017687 **
//**Date?2013.10.9         **
//**File?6.cpp              **
//****************************

int main()
{
	int n;							//??n???????

	cin >> n;						//??n

	for ( int i = 1;i <= n; i++)	//??i?1?n???
	{								//????
		double a,b,c;				//?????????a,b,c

		cin >> a >> b >> c;			//??a,b,c

		double delta = b * b - 4 * a * c;//?????delta
		double line = - b / (2*a);			//?????????line?-b/(2*a)
		cout << fixed << setprecision(5);	//?????cout???????5?

		if ( line == -0 )			//??line?-0
			line = 0;				//??????0			*****?????????0?????*****

		if ( delta == 0 )			//??delta?0
			cout << "x1=x2=" << line << endl;		//??x1=x2=line
		else if (delta > 0)			//?????delta > 0
			cout << "x1=" << line + sqrt(delta)/(2*a)	//????x1?x2
			     << ";x2="<< line - sqrt(delta)/(2*a)
				 << endl;	
		else 			//??
			cout << "x1=" << line << "+"		//????????x1?x2
			     << (sqrt(-delta))/(2*a)<< "i;"
				 << "x2=" << line << "-"
				 << (sqrt(-delta))/(2*a)<< "i"
				 << endl;
	}
	cin.get();
	cin.get();
	return 0;
}
int main()
{
	double n,m,a,b,c,x1,x2,h,j;
	cin>>n;
	for(m=1;m<=n;m++)
	{
		cin>>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);
			if(-0.000001<x1&&x1<0)
				x1=0.00000;
			if(-0.000001<x2&&x2<0)
				x2=0.00000;
			cout<<"x1=";
			printf("%.5f",x1); 
			cout<<";x2=";
			printf("%.5f",x2); 
			cout<<endl;
		}
		else if(b*b-4*a*c==0)
		{
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
			if(-0.000001<x2&&x2<0)
				x2=0.00000;
			cout<<"x1=x2=";
	        printf("%.5f",x1); 
			cout<<endl;
		}
		else
		{
			h=-b/(2*a);
			j=sqrt(4*a*c-b*b)/(2*a);
			if(h==-0.00000)
				h=0.00000;
			if(j==-0.00000)
				j=0.00000;
			cout<<"x1=";
			printf("%.5f",h); 
			cout<<"+";
			printf("%.5f",j); 
			cout<<"i";
			cout<<";x2=";
			printf("%.5f",h); 
			cout<<"-";
			printf("%.5f",j); 
			cout<<"i"<<endl;


		}
	}
			return 0;
	
}
int main(int argc, char* argv[])
{
	
	double a,b,c;
	int n;
	double x1,x2,m,p,q;
	int i=0;
	scanf ("%d",&n);
	for (i=0;i<n;i++)
	{	scanf ("%lf%lf%lf",&a,&b,&c);
        
		m=b*b-4*a*c;
		if (m==0)
		{
			x1=(-b)/(2*a);
			x2=(-b)/(2*a);
			printf ("x1=x2=%.5lf\n",x1);
		}
		if (m>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);
		}
		if (m<0)
		{
            p=(-b)/(2*a) ;
			q= (sqrt(-b*b+4*a*c)/(2*a));
	        printf ("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
		}
	}

		return 0;
}
int main ()
{
    int n,i;
    cin >>n;
    float a[n][3];
    double d,x,y;
    i=1;
    while (i<=n)
    {
          cin >>a[i][1]>>a[i][2]>>a[i][3];
          i++;
    }
    i=1;
    while (i<=n)
    {
          d=a[i][2]*a[i][2]-4*a[i][1]*a[i][3];
          if (d==0)
          {
                   x=-a[i][2]/(2*a[i][1]);
                   cout <<fixed<<setprecision(5)<<"x1=x2="<<x<<endl;
          }
          if (d>0)
          {
                   x=(-a[i][2]+sqrt(d))/(2*a[i][1]); 
                   y=(-a[i][2]-sqrt(d))/(2*a[i][1]);
                   cout <<fixed<<setprecision(5)<<"x1="<<x<<";x2="<<y<<endl;
          }
          if (d<0)
          {
                   x=-a[i][2]/(2*a[i][1]);
                   y=sqrt(-d)/(2*a[i][1]);
                   if (x==-0)
                   {
                          x=0;
                   }
                   cout <<fixed<<setprecision(5)<<"x1="<<x<<"+"<<y<<"i;x2="<<x<<"-"<<y<<"i"<<endl;
          }
          i++;
    }
    return 0;
}
int main()
{
float a,b,c,n,i,j,x,y;
  scanf("%f",&n);
   for(i=1;i<=n;i=i+1)
   {
      scanf("%f %f %f",&a,&b,&c);
      j=b*b-4*a*c;
      if(j>0)
      {printf("x1=%.5f;x2=%.5f\n",((-b+sqrt(j))/(2*a))+0.000001,(-b-sqrt(j))/(2*a))+0;}
      else
            if(j==0)
            {printf("x1=x2=%.5f\n",(-b)/(2*a))+0;}
            else
               {printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-b)/(2*a)+0,sqrt(-j)/2/a+0,(-b)/(2*a)+0,sqrt(-j)/2/a)+0;}
              }  
 }
int main(int argc, char* argv[])
{
    int n,i;
	scanf("%d",&n);i=n;
	double a[n],b[n],c[n];
	double x1[n],x2[n];
	for(;n>0;n--){
		scanf("%lf %lf %lf",&a[n],&b[n],&c[n]);
		if(b[n]*b[n]-4*a[n]*c[n]<0){			 
			 x1[n]=-b[n]/(2*a[n]);
		     x2[n]=sqrt(4*a[n]*c[n]-b[n]*b[n])/(2*a[n]);
		}
        else {
		        x1[n]=(-b[n]+sqrt(b[n]*b[n]-4*a[n]*c[n]))/(2*a[n]);
                x2[n]=(-b[n]-sqrt(b[n]*b[n]-4*a[n]*c[n]))/(2*a[n]);
			}
	}
	for(;i>0;i--){
		if(b[i]*b[i]-4*a[i]*c[i]>0)  printf("x1=%.5lf;x2=%.5lf\n",x1[i],x2[i]);
        else if(x1[i]-x2[i]==0)  printf("x1=x2=%.5lf\n",x1[i]);
		else if(b[i]*b[i]-4*a[i]*c[i]<0)   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1[i],x2[i],x1[i],x2[i]);
	}
	return 0;
}
int main()
{
	short task_number,i;
	double a,b,c,x1,x2,delta,real,image;
	scanf("%d",&task_number);
	for(i=1;i<=task_number;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		delta=b*b-4.0*a*c;
		if(fabs(delta)<1E-5)
		{
			x1=-b/(2.0*a);
			if(fabs(x1)<1E-5)	x1=0.0;
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			if(delta>0)
			{
				x1=(-b+sqrt(delta))/(2*a);  if(fabs(x1)<1E-5)	x1=0.0;
				x2=(-b-sqrt(delta))/(2*a);  if(fabs(x2)<1E-5)	x2=0.0;
				printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			}
			else
			{
				real=-b/(2*a);
				if(fabs(real)<1E-5)		real=0.0;	
				image=sqrt(-delta)/(2*a);
				if(fabs(image)<1E-5)	image=0.0;
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",real,image,real,image);
			}
		}
	}
	return(0);
}
int main(int argc, char* argv[])
{
	int n,j;
	scanf("%d",&n);
	double a,b,c;
	for(j=0;j<n;j++){
        scanf("%lf %lf %lf",&a,&b,&c);
		if((b*b-4*a*c)>0){
            double x1,x2;
			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);
		}
		if((b*b-4*a*c)<0){
			if(b!=0){
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(-b/(2*a)),sqrt(4*a*c-b*b)/(2*a),(-b/(2*a)),sqrt(4*a*c-b*b)/(2*a));
			}else{
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",0.00000,sqrt(4*a*c-b*b)/(2*a),0.00000,sqrt(4*a*c-b*b)/(2*a));
			}
		}
		if((b*b-4*a*c)==0){
            double x1,x2;
			x1=x2=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
	}
	return 0;
}
int main()
{
int n;
float a,b,c;
 cin>>n;
while(n>0){
	double x,y,xi,yi,d;
	cin>>a>>b>>c;
	d=b*b-4*a*c;                     //?????
	if(d>0)
		{x =(-b+sqrt(d))/(2*a) ;    //d>0?????
		y =(-b-sqrt(d))/(2*a) ;
		cout<<"x1="<<fixed<<setprecision(5)<<x<<";x2="<<fixed<<setprecision(5)<<y<<endl;
		}
	else if((d)==0)
		{x=(-b)/(2*a);
		cout<<"x1=x2="<<fixed<<setprecision(5)<<x<<endl;}            //d=0??????
	else
		{if(b!=0)
		x=(-b)/(2*a);
		else
			x=b/(2*a);
			xi=sqrt(-d)/(2*a);
	        yi=sqrt(-d)/(2*a);
		cout<<"x1="<<fixed<<setprecision(5)<<x<<"+"<<fixed<<setprecision(5)
	   <<xi<<"i;x2="<<fixed<<setprecision(5)<<x<<"-"
	   <<fixed<<setprecision(5)<<yi<<"i"<<endl;  }                      //d<0?????
        n--;

}

 return 0;

}
int main(int argc, char* argv[])
{
	int n,i;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		double a,b,c,x1,x2;
		scanf("%lf%lf%lf",&a,&b,&c);
		if (a!=0)
		{
			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)
		{
			printf("x1=x2=%.5f\n",x1);
		}
		else
		{
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		}
			else
			{
				double t;
				t=sqrt(4*a*c-b*b)/(2*a);
				x1=-b/(2*a);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,t,x1,t);
			}
		}
	}
	return 0;
}
int main()
{

double a,b,c,x1,x2,m,y;int n,i;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
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);
}
if (b*b-4*a*c==0) 
{
x1=-b/(2*a);
printf("x1=x2=%.5lf\n",x1);
}
if (b*b-4*a*c<0) 
{
m=-b/(2*a);
y=sqrt(4*a*c-b*b)/(2*a);
printf("x1=%.5lf+%.5lfi;",m,y);
printf("x2=%.5lf-%.5lfi\n",m,y);
}
}

return 0;
}
int main()

{
	int n;
	double a, b, c;
	double delta, x1, x2, real_figure, unreliable_figure; //??????delta????real_figure?????unreliable_figure?? 
	cin >> n; //??????? 
	
	for(int i = 1; i <= n; i++) //??n?????????? 
	{
		cin >> a >> b >> c;
		delta = b * b - 4 * a * c; //??delta 
		
		if(delta >= 0) //??delta???????????????????? 
		{
			x1 = (-b + sqrt(delta))/(2 * a);
			x2 = (-b - sqrt(delta))/(2 * a); //?????x1?x2 
			
			if(x1 == x2) //????????????????? 
				cout << fixed << setprecision(5) << "x1=x2=" << x2 << endl;
			else //???????????????? 
				cout << fixed << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;
		}
		else //delta?????????????? 
		{
			real_figure = b / (2 * a);
			if(real_figure != 0)
				real_figure = -real_figure;
			unreliable_figure = sqrt(-delta) / (2 * a);
			cout << fixed << setprecision(5);
			//???????????????? 
			cout << "x1=" << real_figure << "+" << unreliable_figure << "i;x2=" << real_figure << "-" << unreliable_figure << "i" << endl;
		}
	}
	return 0;
}
//**************************
//*???????????? (1051)**
//*?????? 1200012888 **
//*???2013.10.10**
//**************************
int main()
{
	double a , b , c , x1 ,x2;							//????a b c????x1 x2
	int n;												//?????? n
	cin>>n;												//??n
	for (int i = 1 ; i <= n ; i++)						//???????????????
	{
		cin>>a>>b>>c;									//?? ?? a b c
		if (sqrt(b*b-4*a*c)>0)							//??????????
		{
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a);			//??????? x1 x2
			x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
														//??x1 x2 ????????
		}
		else if (sqrt(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=x2="<<x1<<endl;
														//??x1=x2=... ????????
		}
		else											//???? ??i????????
		{
			if ((-b)/(2*a) != 0)						//????????????? -0
			{
				cout<<fixed<<setprecision(5)<<"x1="<<(-b)/(2*a)<<"+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<";";
				//?? x1 ? ????? ??????
				cout<<fixed<<setprecision(5)<<"x2="<<(-b)/(2*a)<<"-"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<endl;
				//?? x2 ? ????? ??????
			}
			else
			{
				cout<<fixed<<setprecision(5)<<"x1="<<(b)/(2*a)<<"+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<";";
				//?? x1 ? ????? ??????
				cout<<fixed<<setprecision(5)<<"x2="<<(b)/(2*a)<<"-"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<endl;
				//?? x2 ? ????? ??????
			}
		}
	}
	return 0;
}