semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
 int k,n;
 double a[100],b[100],c[100],x1[100],x2[100],p[100],q[100],d[100];
    char i='i';
	scanf("%d\n",&n);
    for(k=1;k<=n;k++)
	{
     scanf("%lf%lf%lf\n",&a[k],&b[k],&c[k]);
	}
	 for(k=1;k<=n;k++)
	 {
         d[k]=b[k]*b[k]-4*a[k]*c[k];
		 if(b[k]!=0)
		 {
         if(d[k]>=0)
		 {
            if(d[k]>0)
			{
			x1[k]=(-b[k]+sqrt(d[k]))/(2*a[k]);
             x2[k]=(-b[k]-sqrt(d[k]))/(2*a[k]);
           printf("x1=%.5lf;x2=%.5lf\n",x1[k],x2[k]);
			}
	         else
			 {
            x1[k]=x2[k]=-b[k]/(2*a[k]);
            printf("x1=x2=%.5lf\n",x1[k],x2[k]);
			 }
		 }
          else
		  {
            p[k]=(-b[k])/(2*a[k]);
            q[k]=sqrt(-d[k])/(2*a[k]);
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p[k],q[k],p[k],q[k]);
		  }
		 }
		 else
		 {
			 if(d[k]>=0)
			 {
				 if(d[k]>0)
				 {
				 x1[k]=(sqrt(d[k]))/(2*a[k]);
			 x2[k]=(sqrt(d[k]))/(2*a[k]);
              printf("x1=%.5lf;x2=%.5lf\n",x1[k],x2[k]);
				 }
				 else
				 {
					 x1[k]=0;
				 x2[k]=0;
				 printf("x1=x2=%.5lf\n",x1[k],x2[k]);
				 }
			 }
				 else
				 {
					 q[k]=(sqrt(-d[k]))/(2*a[k]);
				 p[k]=0;
                  printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p[k],q[k],p[k],q[k]);
				 }
		 }
	  }
}
int main ()
{ 
  int n,i;
  scanf("%d",&n);
  double a[n],b[n],c[n],d[n],e[n],p,q;
  for (i=0;i<n;i++)
  { scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);}
  for (i=0;i<n;i++)
  {   q=b[i]*b[i]-4*a[i]*c[i];
      p=-b[i]/(2*a[i]);
    if (fabs(q)<=1e-6)
    {   d[i]= p;
        printf("x1=x2=%.5f\n",d[i]);}
    if ( q >1e-6)
    {   d[i]=p+(sqrt(q))/(2*a[i]);
        e[i]=p-(sqrt(q))/(2*a[i]);
        printf("x1=%.5f;x2=%.5f\n",d[i],e[i]);}
    if (q<-1e-6)
    {   d[i]=p;
        if (fabs(p)<1e-6) d[i]=0;
        e[i]=sqrt(-q)/(2*a[i]);
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d[i],e[i],d[i],e[i]);  }
   }     
  
  
  
  
  }
int main()
{
int n,m;
double a,b,c,x1,x2,i;
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);
         cout<<fixed<<setprecision(5)<<"x1"<<"="<<x1<<";"<<"x2"<<"="<<x2<<endl;
     }
     if((b*b-4*a*c)==0)//???????
    {
    	x1=x2=(-b) /(2*a);
    	cout<<fixed<<setprecision(5)<<"x1"<<"="<<"x2"<<"="<<x2<<endl;
	   }
     if((b*b-4*a*c)<0)//???????
      {
    	 x1=x2=(-b) /(2*a);
    	 i=fabs(sqrt(4*a*c-b*b)/(2*a));
    	 if (x1>(-0.000001)&& x2<0.000001)x1=x2=0;
    	cout<<fixed<<setprecision(5)<<"x1"<<"="<<x1<<"+"<<i<<"i"<<";"<<"x2"<<"="<<x2<<"-"<<i<<"i"<<endl;
      }
}
 return 0;
  }
void main()
{ int n;
 double a,b,c,disc,x1,x2,realpart,imagpart;
 scanf("%d",&n);
 while(n--)
   {scanf("%lf %lf %lf",&a,&b,&c);
    disc=b*b-4*a*c;
	if(disc==0.0)
	{ printf("x1=x2=%.5lf\n",-b/(2.0*a));}
	 
   else  {if(disc>0.0)
   {x1=(-b+sqrt(disc))/(2.0*a);
	     x2=(-b-sqrt(disc))/(2.0*a);
	      printf("x1=%.5lf;",x1);
		  printf("x2=%.5lf\n",x2);}
	     else
		 {realpart=-b/(2.0*a);
		  imagpart=sqrt(-disc)/(2.0*a);
		  printf("x1=%.5lf+%.5lfi;",realpart,imagpart);
		  printf("x2=%.5lf-%.5lfi\n",realpart,imagpart);} }
    }
}
int main()
{
	int k,i;
	double x[100],y[100],a[100],b[100],c[100],p[100],n[100];
	cin>>k;
	for(i=1;i<=k;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
		p[i]=b[i]*b[i]-4*a[i]*c[i];
		if(p[i]>0)
		{
			x[i]=((-b[i])+sqrt(p[i]))/2/a[i];
			y[i]=((-b[i])-sqrt(p[i]))/2/a[i];
		}
		else if(p[i]==0)
			x[i]=(-b[i])/2/a[i];
		else
		{
			x[i]=(-b[i])/2/a[i];
			y[i]=(-b[i])/2/a[i];
			n[i]=sqrt(0-p[i])/2/a[i];
		}
	}
	for(i=1;i<=k;i++)
	{
		cout<<fixed<<setprecision(5);
		if(p[i]>0)
		{
			cout<<"x1="<<x[i]<<";x2="<<y[i]<<endl;
		}
		else if(p[i]==0)
			cout<<"x1=x2="<<x[i]<<endl;
		else
		{
			if(x[i]==-0)
				cout<<"x1="<<-x[i]<<"+"<<n[i]<<"i"<<";x2="<<-y[i]<<"-"<<n[i]<<"i"<<endl;
			else
				cout<<"x1="<<x[i]<<"+"<<n[i]<<"i"<<";x2="<<y[i]<<"-"<<n[i]<<"i"<<endl;
		}
	}
	return 0;
}
int main()
{
	int n;
	double A[15],B[15],C[15];
	double x1,x2,m,y;
	int 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++) 
	{   m=B[i]*B[i]-4*A[i]*C[i];
	if(m<0)
	{	y=sqrt(-m)/(2*A[i]);
	if(B[i]==0)
    printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(B[i])/(2*A[i]),y,(B[i])/(2*A[i]),y);
	else
	printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(-B[i])/(2*A[i]),y,(-B[i])/(2*A[i]),y);
	}
	else if(m==0)
	{	x1=(-B[i])/(2*A[i]);
	    printf("x1=x2=%.5lf\n",x1);
	}
    else 
	{x1=(-B[i]+sqrt(m))/(2*A[i]);
	x2=(-B[i]-sqrt(m))/(2*A[i]);
	printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	}
	}
	return 0;
}
void main()
{
	float a,b,c;
	double x1,x2,t,p,q;
	int i,n;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%f %f %f",&a,&b,&c);
		t=b*b-4*a*c;
		p=-b/(2*a);
		if (t<0)
		{
			q=sqrt(-t)/(2*a);
			printf("x1=%.5lf+%.5lfi;",p,q);
			printf("x2=%.5lf-%.5lfi\n",p,q);
		}
		else
		{
			q=sqrt(t)/(2*a);
			x1=p+q;
			x2=p-q;
			if (x1==x2) printf("x1=x2=%.5lf\n",x1);
			else printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		};
	};
}
/*
 * phoenix3.cpp
 *Author: ???
 *  Created on: 2013-9-27
 *      ?????????
 */


int main()
{
	float a,b,c;
	double d,derta,g,h,f,k;
	int n,i=0;
	cin>>n;
	for(i=0;i<n;i++)
	 {
		cin>>a>>b>>c;
		d=-b/(2*a);
		if(fabs(d)<1e-10) d=-d;
		derta=b*b-4*a*c;
		if(derta==0)
		{
			 cout<<"x1=x2=";
			 printf("%.5f\n\n",d);

	     }
	    else
	    {
	    	if(derta<0)
	       	{
	    	  f=sqrt(-derta);
	    	  k=f/(2*a);
	    	  cout<<"x1=";
	    	  printf("%.5f",d);
	    	  cout<<"+";
	    	  printf("%.5f",k);
	    	  cout<<"i"<<";"<<"x2=";
	    	  printf("%.5f",d);
	    	  cout<<"-";
	    	  printf("%.5f",k);
	    	  cout<<"i"<<'\n'<<endl;
	       	}
	    	else
	    	{
	    		f=sqrt(derta);
	    		k=f/(2*a);
	    		g=d+k;h=d-k;
	    		cout<<"x1=";
	    		printf("%.5f",g);
	    		cout<<";";
	    		cout<<"x2=";
	    		printf("%.5f",h);
	    		cout<<'\n'<<endl;
		    }
	    }
	 }
	return 0;
}
int main()
{
	int i,n;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		double a,b,c;
		cin>>a>>b>>c;
		if((b*b-4*a*c)>0)
		{
          printf("x1=%.5f", (-b +sqrt(b*b-4*a*c))/(2*a));
		  cout<<";";
           printf("x2=%.5f",(-b-sqrt(b*b-4*a*c))/(2*a));
		   cout<<endl;
		}
		if((b*b-4*a*c)==0)
		{
               printf("x1=x2=%.5f",-b/(2*a));
			   cout<<endl;
		}
		if((b*b-4*a*c)<0)
		{
			if(b==0)
			{
				printf("x1=0.00000+%.5fi",sqrt(4*a*c-b*b)/(2*a));
                 cout<<";";
                  printf("x2=0.00000-%.5fi",sqrt(4*a*c-b*b)/(2*a));
				  cout<<endl;
			}
			else{
			printf("x1=%.5f+%.5fi",-b/(2*a),sqrt(4*a*c-b*b)/(2*a));
			cout<<";";
           	printf("x2=%.5f-%.5fi",-b/(2*a),sqrt(4*a*c-b*b)/(2*a));
			cout<<endl;
			}
		}
	}
	return 0;
}
void main()
{
	int n,j;
	double x1,x2,x3,x4;
	double a[10000],b[10000],c[10000];
	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++)
	{
		if((b[j]*b[j]-4*a[j]*c[j])>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);
		}
		else if((b[j]*b[j]-4*a[j]*c[j])==0)
		{
			x1=-b[j]/(2*a[j]);
			//x2=-b[j]/(2*a[j]);
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			x3=-b[j]/(2*a[j]);
			x4=sqrt(-b[j]*b[j]+4*a[j]*c[j])/(2*a[j]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x3,x4,x3,x4);
		}
	}
}
int main(){
 double d[20][3];
 int n,i;
 scanf("%d", &n);
 
 for(i=0;i<n;i++){
  double a,b,c;
 scanf("%lf %lf %lf" , &a,&b,&c);
  d[i][0]=a;
  d[i][1]=b;
  d[i][2]=c;
 }
 for(i=0;i<n;i++){
  double a,b,c;
  double p;
  a=d[i][0];
  b=d[i][1];
  c=d[i][2];
  
  p=b*b-4*a*c;
  if(p==0) {if (b==0)  printf("x1=x2=%.5lf\n" ,abs((-b)/(2*a)));
	 else printf("x1=x2=%.5lf\n" ,(-b)/(2*a));
  }
  if(p>0)  printf("x1=%.5lf;x2=%.5lf\n",(-b+sqrt(p))/(2*a),(-b-sqrt(p))/(2*a));
  if(p<0)  {if (b==0)   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n" , (b)/(2*a), sqrt(-p)/(2*a),(b)/(2*a),sqrt(-p)/(2*a));
 else  printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n" , (-b)/(2*a), sqrt(-p)/(2*a),(-b)/(2*a),sqrt(-p)/(2*a));
  }
 }
 return 0;
}
int main()
{
	int n,i;
	double a=0.0,b=0.0,c=0.0,x1,x2,y1,y2,p;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		p=b*b-4*a*c;
        if (p==0)
		{
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
		    x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		if (p>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 (p<0)
		{
			y1=(-b)/(2*a);
		    y2 = sqrt(-p)/(2*a);
			if (y1==-0) y1=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",y1,y2,y1,y2);
		}
	}




	return 0;
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int i;
	double a,b,c;
	double A[999],B[999],C[999];
	double delta,x1,x2;
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&A[i],&B[i],&C[i]);
	}
	for(i=0;i<n;i++)
	{
		a=A[i];
		b=B[i];
		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=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(delta==0)
		{
			x1=x2=(-b)/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else if(delta<0)
		{
			double shibu,xubu;
			shibu=(-b)/(2*a);
			xubu=sqrt(-delta)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",shibu,xubu,shibu,xubu);
		}
	}
	return 0;
}
void main()
{
	double k,t,m,l;
	int h,n;
	double u[32768],v[32768],w[32768],e[32768],f[32768],g[32768];
	scanf("%d",&n);
		h=1;
	    while(h<=n)
		{
			scanf("%lf %lf %lf",&u[h],&v[h],&w[h]);
				k=v[h]*v[h]-4*u[h]*w[h];
				t=-k;
			if(k>0)
			{
				e[h]=-v[h]/(2*u[h]);
			    f[h]=sqrt(k)/(2*u[h]);
				g[h]=0;
			}
			else if(k<0)
			{
				e[h]=-v[h]/(2*u[h]);
			    f[h]=sqrt(t)/(2*u[h]);
				g[h]=1;
			}
			else 
			{
				e[h]=-v[h]/(2*u[h]);
				f[h]=0;
				g[h]=2;
			}
			h++;
		}
		h=1;
		while(h<=n)
		{
	            m=e[h]+f[h];
		    l=e[h]-f[h];
			if(fabs(m)<1e-6)
				m=0;
			if(fabs(l)<1e-6)
				l=0;
                        if(fabs(e[h])<1e-6)
				e[h]=0;
			if(fabs(f[h])<1e-6)
				f[h]=0;
			if(g[h]==0)
				printf("x1=%.5f;x2=%.5f\n",m,l);
			if(g[h]==1)
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e[h],f[h],e[h],f[h]);
			if(g[h]==2)
				printf("x1=x2=%.5f\n",m);
			h++;
		}
}
main()
{
	int n,i;
	double a,b,c,d;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%lf%lf%lf",&a,&b,&c);
		d=b*b-4*a*c;
		if(d>0)
			printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(d))/2/a,(-b-sqrt(d))/2/a);
		else 
			if(d==0)
				printf("x1=x2=%.5f\n",-b/2/a);
			else
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/2/a,sqrt(-d)/2/a,-b/2/a,sqrt(-d)/2/a);
	}
	return 0;
}
int main() 
{
	float a[100],b[100],c[100];
	int n,i;
	double k,m,p;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
		scanf("%f %f %f",&a[i],&b[i],&c[i]);
	for (i=1;i<=n;i++)
	{
		k=(b[i]*b[i]-4*a[i]*c[i]);
		if(k==0)
			printf("x1=x2=%.5lf\n",(-b[i])/(2*a[i]));
		if(k>0)
			printf("x1=%.5lf;x2=%.5lf\n",((-b[i])+sqrt(k))/(2*a[i]),((-b[i])-sqrt(k))/(2*a[i]));
		if(k<0) 
		{
			m=(-b[i])/(2*a[i]);
			p=sqrt((-k))/(2*a[i]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,p,m,p);
		}
	}
	return 0;

}
int main(int argc,char*argv[])
{
	int n,i;
	double	a,b,c,x1,x2,d,e,m;
	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(b*b-4*a*c))/(2*a); 
            x2=(-b - sqrt(b*b-4*a*c))/(2*a);
			printf("\nx1=%.5lf;x2=%.5lf",x1,x2);
		}
		else if(d==0)
		{
			x1=0-b/(2*a);
			x2=x1;
			printf("\nx1=x2=%.5lf",x1);
		}
		else
		{
			
			e=sqrt(-b*b+4*a*c)/(2*a);
			m=0-b/(a*2);
			printf("\nx1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi",m,e,m,e);
		}
	}
	return 0;
}
int main()
{
    double a,b,c,x1,x2,z;
    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);
        }
        else if (b*b-4*a*c<0)
        {
            if (b==0) x1=0;
            else x1 = (-b )/(2*a);
            z = sqrt(-b*b+4*a*c)/(2*a); 
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,z,x1,z);
        }
        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);
        }
    }
    return 0;
}
int main (int argc, char *argv[])
{
   int n,j;
   float a[100],b[100],c[100];
   double x1,x2;
   scanf("%d",&n);
   for(j=0;j<n;j++)
   { 
     scanf("%f%f%f\n",&a[j],&b[j],&c[j]);
     if(0<=(b[j]*b[j]-4*a[j]*c[j]))
     {
       x1=(double)(-b[j]+sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
       x2=(double)(-b[j]-sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
       if(x1==x2)
       {
           printf("x1=x2=%.5lf\n",x1);
       }
       else
       {
           printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
           
       }
     }
     else
     {
        double m,l;
        m=(double)-b[j]/(2*a[j]);
        l=(double)sqrt(4*a[j]*c[j]-b[j]*b[j])/(2*a[j]);
        printf("x1=%.5lf+%.5fi;x2=%.5lf-%.5fi\n",m,l,m,l);
     }
   }
  return 0;
}
int main()
{
	int n,i;
	double a[100], b[100], c[100], x1[100], x2[100], under[100], real[100],unreal[100];
	scanf("%d", &n);
	for (i=0; i<n; i++)
	{
		scanf("%lf %lf %lf", &a[i], &b[i], &c[i]);
        under[i]=b[i]*b[i]-4*a[i]*c[i];
		if (under[i]>0)
		{
			x1[i]=(0-b[i]+sqrt(under[i]))/(2*a[i]);
			x2[i]=(0-b[i]-sqrt(under[i]))/(2*a[i]);
			
		}
		if (under[i]==0)
		{
			x1[i]=x2[i]=(-b[i]/(2*a[i]));
			
		}
		if (under[i]<0)
		{
			real[i]=(-b[i]/(2*a[i]));
			unreal[i]=sqrt(-under[i])/(2*a[i]);
		}
	}
	for(i=0; i<n; i++)
	{
	    if(under[i]>0)
			printf("x1=%.5lf;x2=%.5lf\n", x1[i], x2[i]);
		if(under[i]==0)
			printf("x1=x2=%.5lf\n", x1[i]);
		if(under[i]<0)
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", real[i], unreal[i], real[i], unreal[i]);
	}

	return 0;
}
int main()
{
	int n,i,e;
	double a[50][3],x1,x2,s1,s2;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(e=0;e<3;e++)
		{
			scanf("%lf",&a[i][e]);
		}
	}
	for(i=0;i<n;i++)
	{
		if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]>=0)
		{
			x1=(-a[i][1]+sqrt(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]))/(2*a[i][0]);
			x2=(-a[i][1]-sqrt(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]))/(2*a[i][0]);
			if(x1!=x2)
			{
				printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			}
			else
			{
				printf("x1=x2=%.5lf\n",x1);
			}
		}
		else
		{
			s1=-a[i][1]/(2*a[i][0]);
			s2=sqrt(4*a[i][0]*a[i][2]-a[i][1]*a[i][1])/(2*a[i][0]);
			if(s1==0)
			{
				s1=-s1;
			}
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",s1,s2,s1,s2);
		}
	}
	return 0;
}
//********************************
//*????????????   **
//*?????? 1300012855 **
//*???2013.10.11  **
//********************************


int main(void)
{
	int n; // n???????
	double a, b, c; // ???????
	double x1, x2; // ?????? 
	double delta, front, back; // delta?????front?-b/2a?back?sqrt(-delta)/2a
	cin >> n;
	for(int i = 1; i <= n; i++) // ??????i???n??n?????
	{
		cin >> a >> b >> c; // ?????? 
		delta = b * b - 4 * a * c; // ????? 
		if(delta < 0) // ???????????????????front?back??? 
		{
			front = -b / (2 * a); // ?? 
			if(front == 0) front = - front;// ??-0.00000?? 
			back = sqrt(-delta) / (2 * a); // ?? 
			cout << fixed << setprecision(5) << "x1=" << front << '+' << back << "i;";
			cout << fixed << setprecision(5) << "x2=" << front << '-' << back << 'i' << endl;
		} 
		else
		{
			if(delta == 0) // ?????0????????? 
			{
				x1 = -b / (2 * a); // ???????????? 
				cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
			}
			else
			{
				x1 = (-b + sqrt(delta)) / (2 * a); // ????????????? 
				x2 = (-b - sqrt(delta)) / (2 * a);
				cout << fixed << setprecision(5) << "x1=" << x1 << ';' << "x2=" << x2 << endl; 
			}
			
		}
	} 
	return 0;
}
void main(){
	int n, j;
	double a, b, c, delta, o[100], p[100], q[100], realpart, imagpart, x1, x2;
	scanf("%d", &n);
	for (j=0; j<n; j++)
	{
	scanf("%lf %lf %lf", &o[j], &p[j], &q[j]);
	}
	for (j=0; j<n; j++)
	{
    a=o[j];
	b=p[j];
	c=q[j];
	delta=b*b-4*a*c;
    	if (delta > pow(10, -8))
		{
	    x1=(-b+sqrt(delta))/(2*a);
	    x2=(-b-sqrt(delta))/(2*a);
        printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
    	else if (fabs(delta) <= pow(10, -8))
		{
		x1=x2=-b/(2*a);
		printf("x1=x2=%.5lf\n", x1, x1);
		}
    	else
		{
		realpart=-b/(2*a);
		if (realpart==0)
			realpart=fabs(realpart);
		imagpart=sqrt(-delta)/(2*a);
        printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", realpart, imagpart, realpart, imagpart);
		}            
	}
}
int main()
{
	double a,b,c,d;
	double e,f,g,h,j;
	int n,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		d=b*b-4*a*c;
		e=-b/(2*a);
		f=0-e;
		g=sqrt(4*a*c-b*b)/(2*a);
		h=(-b+sqrt(b*b-4*a*c))/(2*a);
		j=(-b-sqrt(b*b-4*a*c))/(2*a);
		if(d==0.0)
			printf("x1=x2=%.5lf\n",e);
		if(d<0.0&&b!=0)
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",e,g,e,g);
		if(d<0.0&&b==0)
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",f,g,f,g);

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

	cin >> num;
	for(i = 0; i < num; i ++)
	{
		cin >> a >> b >> c;
		tmp = b * b - 4 * a * c;
		if (tmp > 0)
		{
			x1 = ( - b + sqrt(b * b - 4 * a * c)) / (2 * a);
			x2 = ( - b - sqrt(b * b - 4 * a * c)) / (2 * a);
			cout << "x1=" << fixed << setprecision(5) << x1;
			cout << ";x2=" << fixed << setprecision(5) << x2 << endl;
		}
		else if(tmp == 0)
		{
			x1 = ( - b ) / (2 * a);
			cout << "x1=x2=" << fixed << setprecision(5) << x1 << endl;
		}
		else
		{
			if (b != 0)
				m = ( - b) / (2 * a);
			else
				m = b / (2 * a);
			n = (sqrt( - tmp)) / (2 * a);
			cout << "x1=" << fixed << setprecision(5) << m;
			cout << "+" << fixed << setprecision(5) << n << "i;";
			cout << "x2=" << fixed << setprecision(5) << m;
			cout << "-" << fixed << setprecision(5) << n << "i";
			cout << endl;
		}
	}

	return 0;
}
/*
 *???: 1.cpp
 *??????
 *????: 2012-10-30
 *??: ???????????
 */


int main ()
{
    int n = 0;
    double a = 0, b = 0, c = 0, Delta = 0;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> a >> b >> c;
        Delta = b * b - 4 * a * c;
        cout << fixed << setprecision(5);
        if (Delta > 0)
            cout << "x1=" << ((0 - b) + sqrt(Delta)) / (2 * a) << ";"
            << "x2=" << ((0 - b) - sqrt(Delta)) / (2 * a) << endl;//delta??0
        if (Delta == 0)
            cout << "x1=x2=" << (0 - b) / (2 * a) << endl;//delta??0
        if (Delta < 0)
            cout << "x1=" << (0 - b) / (2 * a) << "+" << sqrt((-1) * Delta) / (2 * a) << "i;"
            << "x2=" << (0 - b) / (2 * a) << "-" << sqrt((-1) * Delta) / (2 * a) << "i" << endl;//delta??0
    }
    return 0;
}
main()
{
    int n,i;
    double a[100]={0},b[100]={0},c[100]={0},d,e,f;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
    scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
//    printf("%f %f %f",a[1],b[1],c[1]);
    for (i=1;i<=n;i++)
    {
      d=b[i]*b[i]-4*a[i]*c[i];
      e=-b[i]/(2*a[i]);
     {if ((e<0.000001)&&(e>-0.000001))
      e=0;}
      if (d>0.000001)
        printf("x1=%.5f;x2=%.5f\n",(-b[i]+sqrt(d))/(2*a[i]),(-b[i]-sqrt(d))/(2*a[i]));
      else if (d<-0.000001)
        {
        f=sqrt(-d)/(2*a[i]);
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
        }
      else
        printf("x1=x2=%.5f\n",e);
    }
}
int main()
{
    int n,i;
    float a,b,c,d,t;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
    scanf("%f%f%f",&a,&b,&c); 
    d=b*b-4*a*c;
    if(d>0)
    {
           
           printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(d))/(2*a)+1e-6,(-b-sqrt(d))/(2*a)+1e-6);
    }
    else if(d<1e-6&&d>-1e-6)
    {
                   printf("x1=x2=%.5f\n",(-b)/(2*a));
    }
    else
    {
        t=-b/(2*a)+1e-8;
        printf("x1=%.5f%+.5fi;x2=%.5f%+.5fi\n",t,sqrt(-d)/(2*a),t,-sqrt(-d)/(2*a));
        
    }
    }

    //getch();
    return 0;
}
int main()
{    int n,i,j;    
     double x1,x2,s[100][3],a,b,c; 
     scanf("%d",&n);
     for(i=0;i<n;i++)   
     {  for(j=0;j<3;j++) 
         scanf("%lf",&s[i][j]);   
      }    
     for(i=0;i<n;i++) 
     {    a=s[i][0]; 
          b=s[i][1];     
          c=s[i][2]; 
     if(b*b>=4*a*c) 
      {    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=%.5lf\n",x1);   
           else        
               printf("x1=%.5lf;x2=%.5lf\n",x1,x2);  
      }   
     else 
      {   x1=(-b)/(2*a); if(x1==0) x1=0;        
          x2 =sqrt(4*a*c-b*b)/(2*a);         
          x2=fabs(x2);        
          printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
       }  
     }      
  return 0;
}
main()
{
    int n,j=0,i; 
    double a,b,c,x1,x2,p,q,k;  
    
   scanf("%d",&n);  
     
      while(j<n)
        {j++;
        scanf("%lf %lf %lf",&a,&b,&c);
        p=-b/(2.0*a);
        q=sqrt(b*b-4.0*a*c); 
    if(b*b-4.0*a*c!=0.0) 
       { 
         if(b*b-4.0*a*c>0.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(q-0>=0.00001) 
                     printf("x1=%.5f;x2=%.5f\n",x1,x2);
                   else 
                    {
                    if(p<0.00001&&p>-0.00001) printf("x1=x2=0.00000"); 
                    else printf("x1=x2=%.5f\n",p);
                    }
           }
         else 
           {  
              k=(sqrt(4.0*a*c-b*b))/(2*a); 
              if(q-0>=0.00001) 
                printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,k,p,k);
              else 
                  if(p<0.00001&&p>-0.00001)  printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",k,k);
                  else  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,k,p,k);
            }
       }         
            
    else 
       {          
           x1=x2=-b/(2.0*a);
           if(p<0.00001&&p>-0.00001) printf("x1=x2=0.00000"); 
           else printf("x1=x2=%.5f\n",x1,x2);
       }        
   }

}
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);
			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 
			{  
			r = (-b)/(2*a) ;
			d = sqrt(4.0 * a * c -b*b)/(2*a);
			if (b==0) 
			{
				cout << fixed << setprecision (5) << "x1=" << b << "+" << d  << "i" << ";" << "x2=" <<  b  << "-" << d << "i" << endl ;
			}
			else
			{
			cout << fixed << setprecision(5) << "x1=" << r << "+" << d << "i" << ";" << "x2=" << r << -d << "i" << endl;
			}
			}
		}
	}
	return 0 ;
}
double x1, x2;
void cal(double a, double b, double c)
{
	double deta = b * b - 4 * a * c;
	if (deta > 0)
	{
		x1 = (- b + sqrt(deta)) / (2 * a);
		x2 = (- b - sqrt(deta)) / (2 * a);
		cout << fixed << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;
	}
	else
	{
		if (deta == 0)
		{
			if(b == 0)
				x1 = 0;
			else
				x1 = - b / (2 * a);
			cout <<fixed << setprecision(5)<< "x1=x2=" << x1 << endl;
		}
		else
		{
			x1 = sqrt(-deta) / (2 * a);
			if(b == 0)
				x2 = 0;
			else
				x2 = - b / (2 * a);
			cout <<fixed << setprecision(5)<< "x1=" << x2 <<"+" << x1 << "i;x2=" <<x2
				<<"-"<<x1<<"i" << endl;
		}
	}
}

int main()
{
	int n, i;
	double a, b, c;
	cin >> n;
	for(i = 0; i < n; i++)
	{
		cin >> a >> b >> c;
		cal(a,b,c);
	}
	return 0;
}