semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
double a,b,c,d,x,y;
int k;
cin>>k;
for(int i=1;i<=k;i++)
{cin>>a>>b>>c;
d=b*b-4*a*c;
if(d>=0)
{if(d<=0)
{y=-b/(2*a);
cout<<fixed;
	cout<<setprecision(5)<<"x1=x2="<<y<<endl;
}
else
{
d=sqrt(d);
x=(-b+d)/(2*a);
y=(-b-d)/(2*a);
cout<<fixed;
cout<<setprecision(5)<<"x1="<<x<<";x2="<<y<<endl;
}
}
else
{
d=sqrt(-d)/(2*a);
b=-b/(2*a);
if(b==0)
{
cout<<fixed;
cout<<setprecision(5)<<"x1=0.00000+"<<d<<"i"<<";x2=0.00000-"<<d<<"i"<<endl;
}
else
{
cout<<fixed;
cout<<setprecision(5)<<"x1="<<b<<"+"<<d<<"i"<<";x2="<<b<<"-"<<d<<"i"<<endl;
}
}
}
return 0;
}
int main()
{
	double m[2][99],x[99],a,b,c;
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		x[i]=b*b-4*a*c;
		if(x[i]>0)
		{
			m[0][i]=(-b+sqrt(x[i]))/(2*a);
			m[1][i]=(-b-sqrt(x[i]))/(2*a);
		}
		else
		{
			if(x[i]==0)
			{
				m[0][i]=(-b)/(2*a);
			}
			else
			{
				m[0][i]=(-b)/(2*a);
				m[1][i]=sqrt(-x[i])/(2*a);
			}
		}
	}
	for(i=0;i<n;i++)
	{
		if(x[i]>0)
		{
			printf("x1=%.5lf;x2=%.5lf\n",m[0][i],m[1][i]);
		}
		else
		{
			if(x[i]==0)
			{
				printf("x1=x2=%.5lf\n",m[0][i]);
			}
			else
			{
				if(m[0][i]==0)
				{
					printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-m[0][i],m[1][i],-m[0][i],m[1][i]);
				}
				else
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m[0][i],m[1][i],m[0][i],m[1][i]);
			}
		}
	}
	return 0;
}
int main ()
{
	int n , i ;
	float a , b , c;
	double x1 , x2 , r , d ;
	cin >> n ;
	for (i = 1 ; i <= n ; i++)
	{
		cin >> a >> b >> c ;
		if (b*b-4*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);
			if (b==0) 
			{
				b=0;
			}
			cout << fixed << setprecision(5) <<"x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else 
		{
			if (b*b-4.0*a*c==0)
			{	
				x1 = x2 = (-b)/(2.0*a);
			    cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
			}
		    else 
			{  
				if (b != 0) 
				{
					r = (-b)/(2*a) ;
				}
				else 
				{
					r = 0 ;
				}
				d = sqrt(4.0 * a * c -b*b)/(2*a);
				cout << fixed << setprecision(5) << "x1=" << r << "+" << d << "i" << ";" << "x2=" << r << -d << "i" << endl;
			}
		}
	}
	return 0 ;
}
//?????????
int main()
{
	int n = 0, i = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		double a = 0, b = 0, c = 0;
		cin >> a >> b >> c;
		double d = b * b - 4 * a * c, x1 = 0, x2 = 0, r = 0,t = 0;
		if (d >= 0)
		{
			x1 = (-b + sqrt(d)) / (2 * a);
			x2 = (-b - sqrt(d)) / (2 * a);
			if (x1 == x2)
				cout << "x1=x2=" << fixed << setprecision(5) << x1 << endl;
			else
				cout << fixed << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;
		}
		else
		{
			d = - d;
			r = - b / (2 * a);
			if ( r == 0)
				r = 0;
			t = sqrt(d) / (2 * a);
			cout << fixed << setprecision(5) << "x1=" << r << "+" << t << "i" << ";x2=" << r << "-" << t << "i" << endl;
		}
	}
	return 0;
}
//****************************************
//*?? ?????????                  **
//*?????? 1100013020       **
//*???2011.9.23                          **
//****************************************



int main()
{
	int i,n;
	double a[100],b[100],c[100],x1[100],x2[100],k[100],l[100],p[100];     //???????????
	i=1;
	cin>>n;
	for (;i<=n;)                    //????
	{
		cin>>a[i]>>b[i]>>c[i];
		if (b[i]*b[i]-4*a[i]*c[i]>=0)   //??
		{
			x1[i]=(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			x2[i]=(-b[i]-sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			if (x1[i]<0 || x1[i]>0)
				x1[i]=x1[i];
			else
				x1[i]=0.00000;
			if (x2[i]<0 || x2[i]>0)
				x2[i]=x2[i];
			else
				x2[i]=0.00000;

		}
		else            //???
		{
			k[i]=-b[i]/(2*a[i]);
			l[i]=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
			p[i]=i;
			if (k[i]<0 || k[i]>0)
				k[i]=k[i];
			else
				k[i]=0.00000;       //??-0???
			if (l[i]<0 || l[i]>0)
				l[i]=l[i];
			else
				l[i]=0.00000;     //??-0???
		}
		i=i+1;       //??
	}
	i=1;
	for (;i<=n;)
	{
		if (i<p[i] || i>p[i])
		{
			if (x1[i]<x2[i]||x1[i]>x2[i])
			{
				cout<<fixed<<setprecision(5)<<"x1="<<x1[i]<<";x2="<<x2[i]<<endl;     //x1?x2??????????5???
			}
			else
			{
				cout<<fixed<<setprecision(5)<<"x1=x2="<<x1[i]<<endl;       //x1?x2????????5???
			}
		}
		else
		{
			cout<<fixed<<setprecision(5)<<"x1="<<k[i]<<"+"<<l[i]<<"i"<<";x2="<<k[i]<<"-"<<l[i]<<"i"<<endl;  //??
		}
		i=i+1;
	}
	return 0;
}
//***********************************
//*	  ????6.cpp					*
//*   ?????					*
//*   ???2013.10.9				*
//*	  ????????????      *
//***********************************
int main()
{
	int n , i ;
	double root1 , root2, a , b , c ;
	cin >> n ;
	for (i = 0 ; i < n ; i++)
	{
			cin >> a >> b >> c ;
			cout << fixed;
			if ( b * b - 4.0 * a * c > 0)
			{
				root1 = ( -b + sqrt( b * b - 4 * a * c ))/( 2 * a ) ;
				root2 = ( -b - sqrt( b * b - 4 * a * c ))/( 2 * a ) ;
				cout << setprecision(5) << "x1=" << root1 << ";x2=" << root2 << endl ;
			}
			else if ( b * b - 4.0 * a * c == 0)
			{
				cout <<  setprecision(5) << "x1=x2=" << -b/(2*a) <<endl;
			}
			else 
			{
				if (b == 0.0)
				{
					b= -b ;
				}
				root1 = sqrt( -b * b + 4 * a * c )/( 2 * a );
				root2 = sqrt( -b * b + 4 * a * c )/( 2 * a );
				cout <<  setprecision(5) << "x1=" << -b/(2*a) << "+" << root1 << "i;x2=" << -b/(2*a) << "-" << root2 << "i" << endl ;
			}
			}
	return 0 ;
}
main()
{
 int n,j;
 double a,b,c;
 double p,q,r,u,v,t;
 double x1,x2;
 char i;
 scanf("%d",&n);
 double m[100][3];
 for(j=0;j<n;j++)
 {
  scanf("%lf%lf%lf\n",&a,&b,&c);                
  m[j][0]=a;
  m[j][1]=b;
  m[j][2]=c;                
  }
    for(j=0;j<n;j++)
{
p=m[j][0];
q=m[j][1];
r=m[j][2];
t=q*q-4*p*r;
if(t>0)
 { 
  double p1;
  p1=2*p; 
  x1=(-q+sqrt(t))/p1;
  x2=(-q-sqrt(t))/p1;   
  printf("x1=%.5lf;x2=%.5lf\n",x1,x2);     
       } 
  else
  {
   if(t==0)
   {
   x1=-q/(2*p);
   x2=-q/(2*p);
   printf("x1=x2=%.5lf\n",x1);
   }
   else
   {
   u=sqrt(-t)/(2*p);
   v=(-q)/(2*p);
  if(v!=0)
   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",v,u,v,u);
  else
   printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",u,u); 
   }
   }     
      }
   getchar();
   getchar();   
   getchar();
   getchar();           
}
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		float a,b,c;
		cin>>a>>b>>c;
		double delta=b*b-4*a*c;
		cout<<fixed<<setprecision(5);
		if(delta>0)
		{
			double x1=(-b+sqrt(delta))/(2*a);
			double x2=(-b-sqrt(delta))/(2*a);
			if(x1==-0.0) x1=0.0;
			if(x2==-0.0) x2=0.0;
			cout<<"x1="<<x1<<";x2="<<x2<<endl;
			continue;
		}
		if(delta==0)
		{
			double x=-b/(2*a);
			if(x==-0.0) x=0.0;
			cout<<"x1=x2="<<x<<endl;
			continue;
		}
		if(delta<0)
		{
			double re=-b/(2*a);
			double im=sqrt(-delta)/(2*a);
			if(re==-0.0) re=0.0;
			cout<<"x1="<<re<<"+"<<im<<"i;x2="<<re<<"-"<<im<<"i"<<endl;
		}
	}
 	return 0;
}
int main()
{
	double a[len],b[len],c[len],x[len],y[len],x1,x2,d;
	int n,i;
	char m='i';
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%lf%lf%lf",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++){
		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]);
		    printf("x1=%.5lf;x2=%.5lf\n",x[i],y[i]);
		}
		if((b[i]*b[i]-4*a[i]*c[i])==0){
			printf("x1=x2=%.5lf\n",-b[i]/(2*a[i]));
		}
		if((b[i]*b[i]-4*a[i]*c[i])<0){
           d=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
		   printf("x1=%.5lf+%.5lf%c;x2=%.5lf-%.5lfi\n",-b[i]/(2*a[i]),d,m,-b[i]/(2*a[i]),d,m);
		}
	}
	return 0;
}
int main()
{
	int n,i;
	cin >> n;
	for(i=0;i<n;i++)
	{    
		double a[100], b[100], c[100], d, x1 , x2, f, g;
	     
		 cin >> a[i] >> b[i]>> c[i];
		 d=b[i]*b[i]-4*a[i]*c[i];
		 if(d>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]) ; 
			cout << fixed << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
			
		 }
		 if(d==0)
		 { 
			 x1=x2=-b[i]/(2*a[i]);
			 cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
			
		 }
		 if(d<0)
		 {
			 f=0-(b[i]/(2*a[i]));
			 g=sqrt(-d)/(2*a[i]);
			 cout << fixed << setprecision(5) << "x1=" << f<<"+"<< g<<"i"<<";"<<"x2=" << f <<"-"<< g<<"i" <<endl;
			 
		 }
		
	}
	return 0;
}
main()
{
      double a,b,c;
      int i=1,d;
      scanf("%d",&d);
      for (i;i<=d;i++)
      {
        scanf("%lf %lf %lf",&a,&b,&c);
        if (b*b-4*a*c>0)
        {printf("x1=%.5f;x2=%.5f\n",(0-b + sqrt(b*b-4*a*c))/(2*a),(0-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)
        {printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\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,m;
	float a,b,c;
         double z,x,y,d,e,f;
	scanf("%d",&n);
	for(m=0;m<n;m++){
		scanf("%f %f %f",&a,&b,&c);
		z=b*b-4*a*c;
		if(z>0) {
		x=(-b+sqrt(z))/(2*a);
                  if(x<0.0001&&x>-0.0001) x=0.00000;
		y=(-b-sqrt(z))/(2*a);
		printf("x1=%.5f;x2=%.5f\n",x,y);};
		if(z==0) {
		f=(-b)/(2*a);
		printf("x1=x2=%.5f\n",f);};
		if(z<0) {
		d=sqrt(-z)/(2*a); 
                  if(b==0) e=0;
		if(b!=0) e=(-b)/(2*a);
                  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,d,e,d);};
	}
}
int main(int argc, char* argv[])
{
    int i,n;
	double a[100],b[100],c[100];
	double k;
	scanf("%d",&n);
	double x1,x2;
	double f;
    for(i=0;i<n;i++)
	{
    scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
    }
	for(i=0;i<n;i++)
	{
	    f=-(b[i]/2/a[i]);
		double j=sqrt(b[i]*b[i]-4*a[i]*c[i])/(2*a[i]);
		if(b[i]!=0)
		{
			if(b[i]*b[i]-4*a[i]*c[i]>0)
			{
                x1=f+j;
				x2=f-j;
				printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			}
			if(b[i]*b[i]-4*a[i]*c[i]<0)
			{
				k=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",f,k,f,k);
			}
			if(b[i]*b[i]-4*a[i]*c[i]==0)
            {
				x1=f;
				x2=f;
				printf("x1=x2=%.5lf\n",f,f);
			}
		}
        if(b[i]==0)
        {
            if(b[i]*b[i]-4*a[i]*c[i]>0)
			{
			    x1=j;
		        x2=-j;
                printf("x1=0.00000+%.5lf;x2=0.00000+%.5lf\n",x1,x2);
			}
            if(b[i]*b[i]-4*a[i]*c[i]<0)
			{
                k=sqrt(4*a[i]*c[i])/(2*a[i]); 
                printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",k,k);
			}
            	if(-4*a[i]*c[i]==0)
			{
				x1=f;
				x2=f;
				printf("x1=x2=0.00000\n");
			}
		}
		}
	return 0;
}
int main()
{
    int n;
    scanf("%d", &n);
    double a[100],b[100],c[100];
    int i;
    double delta[100];
    double x1,x2;
    double x11,x12,x21,x22;
    double mo[100];
    double e[100];
    
    for(i=1;i<=n;i++)
    {
                     scanf("%lf%lf%lf", &a[i], &b[i], &c[i]);
                     delta[i]= b[i]*b[i]-4*a[i]*c[i];
                     e[i]=(b[i]==0) ?0 : (-b[i])/(2 * a[i]);
    }
 
    for(i=1;i<=n;i++)
    {
                     if(delta[i]>0)
                     {
                                   x1=e[i]+sqrt(delta[i])/(2*a[i]);
                                   x2=e[i]-sqrt(delta[i])/(2*a[i]);
                                   printf("x1=%.5lf;x2=%.5lf\n", x1,x2);
                                   continue;
                     }
                     else if(delta[i]<0)
                     {
                           mo[i]=sqrt(-delta[i]);
                           x11=e[i];
                           x12=mo[i]/(2*a[i]);
                           x21=x11;
                           x22=mo[i]/(2*a[i]);
                           printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", x11,x12,x21,x22);
                           continue;
                     }
                     else if(delta[i]<pow(10,-8))
                     {
                                   x1=e[i];
                                   printf("x1=x2=%.5lf\n", x1);
                     
                     }
                     
    }
    return 0;
}
int main()
{
	int n;                                     //????n????????
  
	double a, b, c, x1, x2, shi, xu;           //?????a,b,c???,x1,x2?????,shi,xu?????

	cin >> n;                                  //????????

	for ( int p = 1; p <= n; p++ )             //????

	{
		cin >> a >> b >> c;

		if ( b * b - 4 * a * c < 0 )           //????????????0?

		{
			shi = -b / (2 * a);

			xu = sqrt(4 * a * c - b * b) / ( 2 * a );        //???

			if (shi == 0)

			{
				shi = -shi;
			}

		   	printf ("x1=""%.5f",shi);
				
		   	printf ("+""%.5f",xu);
	
		  	printf ("i;x2=""%.5f",shi);
			
		   	printf ("-""%.5f",xu);

		   	printf ("i");

		   	printf ("\n");

		}

		else if ( b * b - 4 * a * c == 0 )      //????????????0?

		{
			x1 = ( -b + sqrt(b * b - 4 * a * c)) / (2 * a);    //???

			printf ( "x1=x2=""%.5f",x1);

			printf ("\n");
		}

		else                                    //????????????0?

		{
			x1 = ( -b + sqrt(b * b - 4 * a * c)) / (2 * a);

			x2 = ( -b - sqrt(b * b - 4 * a * c)) / (2 * a);    //???

			printf ("x1=""%.5f",x1);

			printf (";x2=""%.5f",x2);

			printf ("\n");
		}
	}
	return 0;
}
int main()
{
double a,b,c,d,x,y;
int k;
cin>>k;
for(int i=1;i<=k;i++)
{cin>>a>>b>>c;
d=b*b-4*a*c;
if(d>=0)
{if(d<=0)
{y=-b/(2*a);
cout<<fixed<<setprecision(5)<<"x1=x2="<<y<<endl;
}
else
{
d=sqrt(d);
x=(-b+d)/(2*a);
y=(-b-d)/(2*a);
cout<<fixed<<setprecision(5)<<"x1="<<x<<";x2="<<y<<endl;
}
}
else
{
d=sqrt(-d)/(2*a);
b=-b/(2*a);
if(b==0)
{
cout<<fixed;
cout<<setprecision(5)<<"x1=0.00000+"<<d<<"i"<<";x2=0.00000-"<<d<<"i"<<endl;
}
else
{
cout<<fixed<<setprecision(5)<<"x1="<<b<<"+"<<d<<"i"<<";x2="<<b<<"-"<<d<<"i"<<endl;
}
}
}
return 0;
}
int main()
{
 int n,i;
 scanf("%d",&n);
double a,b,c,d,e;
 for(i=0;i<n;i++)
 {
 scanf("%lf%lf%lf",&a,&b,&c);
 d=b*b-4*a*c;
 if(b==0)
	 e=0;
 else e=(-b)/(2*a);
if(d>0)
  printf("x1=%.5lf;x2=%.5lf\n",e+sqrt(d)/(2*a),e-sqrt(d)/(2*a));
else if(d<0)
  printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n",e,sqrt(-d)/(2*a),e,-sqrt(-d)/(2*a));
  else printf("x1=x2=%.5lf\n",e);
 }
return 0;	  
}
int main()
{
	int n,i=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{	float a,b,c,d;
       double disc,x1,x2,realpart,imagpart;
	scanf ("%f%f%f",&a,&b,&c);
	disc=b*b-4*a*c;
	if(fabs(disc)==0)
		printf("x1=x2=%.5f\n",-b/(2*a));
	else if (disc>0)
	{x1=(-b+sqrt(disc))/(2*a);
	x2=(-b-sqrt(disc))/(2*a);
	printf ("x1=%.5f;x2=%.5f\n",x1,x2);
	}
	else
	{realpart=-b/(2*a);
	imagpart=sqrt(-disc)/(2*a);
	printf("x1=%.5f+%.5fi;",realpart,imagpart);
	printf("x2=%.5f-%.5fi\n",realpart,imagpart);
	}
	}
	return 0;
}
int main()
{
    double a, b, c, delta, x1, x2;
    int n;
    scanf("%d", &n );
    while( n-- ) {
        scanf("%lf %lf %lf", &a, &b, &c );
        delta = b * b - 4 * a * c;
        if( delta < 0 ) {
            delta = sqrt(-delta) / 2 / a;
            printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n", -b/2/a, delta, -b/2/a, -delta );
        } else if( delta > 0 ){
            delta = sqrt(delta)/2/a;
            printf("x1=%.5lf;x2=%.5lf\n", -b/2/a+delta, -b/2/a-delta );
        } else {
            printf("x1=x2=%.5lf\n", -b/a/2 );
        }
    }
}
main()
{
      int p,n;
      double a,b,c,x1,x2,m;
      scanf("%d",&n);
      for(p=1;p<=n;p++)
      {
      scanf("%lf %lf %lf",&a,&b,&c);
      m=b*b-4*a*c;
      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=%.5f;x2=%.5f\n",x1,x2);
      }
      else if(m==0)
      {
             x1=-b/(2*a);
             printf("x1=x2=%.5f\n",x1);
      }
      else
      {
          if(-b/(2*a)==-0.00000)
          printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b/(2*a),sqrt(-m)/(2*a),b/(2*a),sqrt(-m)/(2*a));
          else
          printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-m)/(2*a),-b/(2*a),sqrt(-m)/(2*a));
          }
          }
      }
int main()
{int n=0;
double a=0,b=0,c=0,d=0;
cin>>n;
for(int i=1;i<=n;i++)
{cin>>a>>b>>c;
d=b*b-4*a*c;
if(b-0==0)
 {if(d-0>0)
   {cout<< fixed << setprecision(5) << "x1=0.00000+"<<sqrt(d)/(2*a)<<";"<<"x2=0.00000"<<-sqrt(d)/(2*a)<<endl;
    }
   if(d-0==0)
    {cout<<fixed << setprecision(5) << "x1=x2="<<-b/(2*a)<<endl;
    }
     if(d-0<0)
    {cout<<fixed << setprecision(5) << "x1=0.00000+"<<sqrt(-d)/(2*a)<<"i"<<";"<<"x2=0.00000-"<<sqrt(-d)/(2*a)<<"i"<<endl;
       }

}
else{
if(d-0>0)
   {cout<< fixed << setprecision(5) << "x1="<<-b/(2*a)+sqrt(d)/(2*a)<<";"<<"x2="<<-b/(2*a)-sqrt(d)/(2*a)<<endl;
    }
   if(d-0==0)
    {cout<<fixed << setprecision(5) << "x1=x2="<<-b/(2*a)<<endl;
    }
     if(d-0<0)
    {cout<<fixed << setprecision(5) << "x1="<<-b/(2*a)<<"+"<<sqrt(-d)/(2*a)<<"i"<<";"<<"x2="<<-b/(2*a)<<"-"<<sqrt(-d)/(2*a)<<"i"<<endl;
       }
}
   }
 
 return 0;
}
int main()
{
    int i,n;
    double x1,x2,a,b,c;
    scanf("%d",&n);
    double m[n],y[n],z[n];
    for(i=1;i<=n;i++){
                      scanf("%lf %lf %lf",&m[i],&y[i],&z[i]);
                      }
    for(i=1;i<=n;i++){                   
                      a=m[i];b=y[i];c=z[i];
                      if((b*b-4*a*c)<0){
                                      x1=-b/(2*a);
                                      x2=sqrt(-b*b+4*a*c)/(2*a);
                                        if(x1==-0)
          {x1=0;
          }
          if(x2==-0)
          {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==x2){
                                       printf("x1=x2=%.5f\n",x1);
                                      }
                                 else{
                                       printf("x1=%.5f;x2=%.5f\n",x1,x2);
                                        }
                           }
                      }
}
void main()
{
	int n,i;
	double p,q,t,x1,x2,a,b,c;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		p=-b/(2*a);
		t=b*b-4*a*c;

		if (t>0)
		{
			q=sqrt(b*b-4*a*c)/(2*a);
			x1=p+q;
			x2=p-q;
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if (t==0)
		{
		printf("x1=x2=%.5lf\n",p);
		}
		else if (t<0)
		{
			q=sqrt(-b*b+4*a*c)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
		}
	}
}
int main()
{
	int n,i;
	double a,b,c,k,s,l;
	cin>>n;
	cout<<fixed;
	cout.precision(5);
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		if(b*b-4*a*c>=0)
		{
			k=sqrt(b*b-4*a*c);
			if(k==0)
			{
				if(b==0)
					s=0;
				else
				    s=-b/(2*a);
				cout<<"\nx1=x2="<<s;
			}
			else
			{
				s=(-b+k)/(2*a);
				l=(-b-k)/(2*a);
				cout<<"\nx1="<<s<<";x2="<<l;
			}
		}
		else
		{
			k=sqrt(4*a*c-b*b);
			if(b==0)
				s=0;
			else
			    s=-b/(2*a);
			l=k/(2*a);
			cout<<"\nx1="<<s<<"+"<<l<<"i;x2="<<s<<"-"<<l<<"i";
		}
	}
	return 0;
}
int main()
{
	int n,i;
	double x1[100],x2[100],num1[100],num2[100],num3[100];
	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++)
	{
		num1[i]=b[i]*b[i]-4*a[i]*c[i];
			if (num1[i]>1e-6)
			{
				x1[i]=(-b[i]+sqrt(num1[i]))/(2*a[i]);
				x2[i]=(-b[i]-sqrt(num1[i]))/(2*a[i]);
				printf("x1=%.5f;x2=%.5f\n",x1[i],x2[i]);
			}
			else if (num1[i]<=1e-6&&num1[i]>=-1e-6)
			{
				x1[i]=-b[i]/(2*a[i]);
				printf("x1=x2=%.5f\n",x1[i]);
			}
			else
			{
				num2[i]=-b[i]/(2*a[i]);
				num3[i]=sqrt(-num1[i])/(2*a[i]);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",num2[i],num3[i],num2[i],num3[i]);
			}
	}
	return 0;
}
void main()
{
   int n;
   scanf("%d",&n);
   double a[1000],b[1000],c[1000];
   int q;
   double x1,x2;
   for(q=0;q<n;q++)
   {
	scanf("%lf%lf%lf",&a[q],&b[q],&c[q]);
   }
   
	for(q=0;q<n;q++)
	{
		double d = b[q]*b[q]-4*a[q]*c[q];
		if(d>0)
		{
			x1=(-b[q] + sqrt(d))/(2*a[q]) ;
			x2=(-b[q] - sqrt(d))/(2*a[q]);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(d==0)
		{
			x1=(-b[q] )/(2*a[q]) ;x2=(-b[q] )/(2*a[q]) ;
			printf("x1=x2=%.5f\n",x1);
		}
		else 
		{	
            printf("x1=%.5f+%.5fi;x2=%.5f%.5fi\n",-b[q]/(2*a[q]),sqrt(-d)/(2*a[q]),-b[q]/(2*a[q]),- sqrt(-d)/(2*a[q]));
		}
	}
}
main()
{
  int n,i;   
  double  a[999],b[999],c[999],x1,x2,d;
  scanf("%d",&n);
  i=1;  
  
  
  while(i<=n)
    { 
      scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
      i=i+1;
    } 
    
    
  {
   i=1;   
   for(i=1;i<=n;)
  { if (b[i]!=0)
      {d=b[i]*b[i]-4*a[i]*c[i];
        if(d>0)
          { x1=(-b[i] + sqrt(d))/(2*a[i]);
            x2=(-b[i] - sqrt(d))/(2*a[i]);
            printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
          }     
        if(d==0)
          { x1=-b[i]/(2*a[i]);
            x2=-b[i]/(2*a[i]);
            printf("x1=x2=%.5lf\n",x1);
          }     
        if(d<0)
          { x1=-b[i]/(2*a[i]);
            x2=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
          } 
        }  
 if (b[i]==0)
   { 
   d=b[i]*b[i]-4*a[i]*c[i];
        if(d>0)
          { x1=(-b[i] + sqrt(d))/(2*a[i]);
            x2=(-b[i] - sqrt(d))/(2*a[i]);
            printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
          }     
        if(d==0)
          { x1=(fabs)(-b[i]/(2*a[i]));
            x2=(fabs)(-b[i]/(2*a[i]));
            printf("x1=x2=%.5lf\n",x1);
          }
        if(d<0)
          { x1=(fabs)(-b[i]/(2*a[i]));
            x2=(fabs)(sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]));
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
          } 
       
      }
    i=i+1;
   }
  }
}
/*????
x1 = (-b + sqrt(b*b-4*a*c))/(2*a)
x2 = (-b - sqrt(b*b-4*a*c))/(2*a)
??????? ax2 + bx + c = 0 ?????a???0?

????
???????????n?
??n?????????a, b, c??????????????????ax2 + bx + c =0???

????
????n????????????
???????????x1=...;x2 = ...
????????????x1=x2=...
???????????x1=??+??i; x2=??-??i

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

	}
	return 0;

}
int main()
{
	int n,i;
	scanf("%d",&n);
	double a,b,c;
	double x1,x2;
	for(i=1;i<=n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
      if(b*b-4*a*c>0.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.0)
	  {
		  if(b!=0)
		  {
		  x1=-b/(2*a);
		  x2=sqrt(4*a*c-b*b)/(2*a);
	
		  if(sqrt(4*a*c-b*b)/(2*a)>0)
		  {
          printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
		  }
          if(sqrt(4*a*c-b*b)/(2*a)<0)
		  {
          printf("x1=%.5lf%.5lfi;x2=%.5lf+%.5lfi\n",x1,x2,x1,-x2);
		  }
		  }
          else if(b==0)
		  {
		  x1=-b/(2*a);
		  x2=sqrt(4*a*c-b*b)/(2*a);
		
		  if(sqrt(4*a*c-b*b)/(2*a)>0)
		  {
          printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-x1,x2,-x1,x2);
		  }
          if(sqrt(4*a*c-b*b)/(2*a)<0)
		  {
          printf("x1=%.5lf%.5lfi;x2=%.5lf+%.5lfi\n",-x1,x2,-x1,-x2);
		  }
		  }
	  }
       else 
	  {
		  x1=x2=-b/(2*a);
		  printf("x1=x2=%.5lf\n",x1);
	  }
	}
	return 0;
}
int main()
{
	int i,n;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		double a=0,b=0,c=0;
		cin>>a>>b>>c;
		if(b*b-4*a*c==0)
		{
			cout<<"x1=x2="<<fixed<<setprecision(5)<<-b/(2*a)<<endl;
		    continue;
		}
		if(b*b-4*a*c>0)
		{
			cout<<"x1="<<fixed<<setprecision(5)<<(-b + sqrt(b*b-4*a*c))/(2*a)
			    <<";x2="<<(-b - sqrt(b*b-4*a*c))/(2*a)<<endl;
			continue;
		}
		if(b*b-4*a*c<0)
		{
			if(b/(2*a)==0)
				cout<<fixed<<setprecision(5)<<"x1="<<b/(2*a)<<"+"<<sqrt(-(b*b-4*a*c))/(2*a)
				   <<"i;x2="<<b/(2*a)<<"-"<<sqrt(-(b*b-4*a*c))/(2*a)<<"i"<<endl;
			else
				cout<<fixed<<setprecision(5)<<"x1="<<-b/(2*a)<<"+"<<sqrt(-(b*b-4*a*c))/(2*a)
				    <<"i;x2="<<-b/(2*a)<<"-"<<sqrt(-(b*b-4*a*c))/(2*a)<<"i"<<endl;
			continue;
		}
	}
	return 0;
}