semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(int argc, char* argv[])
{
	int j,n;
	float a[1000],b[1000],c[1000];
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%f %f %f",&a[j],&b[j],&c[j]);
	}

	for(j=1;j<=n;j++)
	{
		if(b[j]*b[j]-4*a[j]*c[j]>0)
		{
			printf("x1=%.5f;x2=%.5f\n",(float)(-b[j]+sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]),(float)(-b[j]-sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]));
		}
		if(b[j]*b[j]-4*a[j]*c[j]==0)
		{
			printf("x1=x2=%.5f\n",(float)(-b[j]/(2*a[j])));
		}
		if(b[j]*b[j]-4*a[j]*c[j]<0)
		{
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(float)(-b[j]/(2*a[j])),(float)(sqrt(4*a[j]*c[j]-b[j]*b[j])/(2*a[j])),(float)(-b[j]/(2*a[j])),(float)(sqrt(4*a[j]*c[j]-b[j]*b[j])/(2*a[j])));
		}
	}
	return 0;
}
int main()
{
   int n,o,g;
   double a,b,c,d,x1,x2;
   cin>>n;
   for(o=1;o<=n;o++)
   {
	   cin>>a>>b>>c;
	   if(a<0)
	   {
		   a=0-a;
		   b=0-b;
		   c=0-c;
	   }
	 d=b*b-4*a*c;
	 if(d>0)
		 g=2;
	 else if(d<0)
		 {
		 g=0;
		 d=0-d;
		 }
	 else
		 g=1;
	 if(g==1)
	 {
		 x1=-b/(2*a);
		 cout<<"x1=x2=";
		 printf("%.5f",x1);
		 cout<<endl;
	 }
	 else if(g==2)
	 {
		 x1=(sqrt(d)-b)/(2*a);
		 x2=(-sqrt(d)-b)/(2*a);
		 cout<<"x1=";
		 printf("%.5f",x1);
		 cout<<";x2=";
		 printf("%.5f",x2);
		 cout<<endl;
	 }
	 else
	 {
		 x1=sqrt(d)/(2*a);
		 cout<<"x1=";
		 printf("%.5f",-b/(2*a));
		 cout<<"+";
		 printf("%.5f",x1);
		 cout<<"i;x2=";
		 		 printf("%.5f",-b/(2*a));
		 		 cout<<"-";
		 		 printf("%.5f",x1);
		 		 cout<<"i"<<endl;
	 }
   }
   return 0;
}
int main()
{
    int i,j,k,n;
    double x1[100],x2[100];
    double a[100],b[100],c[100],d[100];
    scanf("%d\n",&n);
    for(i=1;i<=n;i++)
    {
    scanf("%lf %lf %lf\n",&a[i],&b[i],&c[i]);
    d[i]=b[i]*b[i]-4*a[i]*c[i];
    }
    for(i=1;i<=n;i++)
    {
    if(d[i]>0)
    {
              x1[i]=(-b[i]+sqrt(d[i]))/(2*a[i]);
              x2[i]=(-b[i]-sqrt(d[i]))/(2*a[i]);
              printf("x1=%.5lf;x2=%.5lf\n",x1[i],x2[i]);
    }
    if(d[i]==0)
    {
               x1[i]=x2[i]=(-b[i]+sqrt(d[i]))/(2*a[i]);
               printf("x1=x2=%.5lf\n",x1[i]);
    }
    if(d[i]<0)
    {
              if(b[i]==0)
              {
                         x1[i]=b[i]/(2*a[i]);
                         x2[i]=sqrt(-d[i])/(2*a[i]);
                         printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1[i],x2[i],x1[i],x2[i]);
              }
              else
              {
              x1[i]=-(b[i]/(2*a[i]));
              x2[i]=sqrt(-d[i])/(2*a[i]);
              printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1[i],x2[i],x1[i],x2[i]);
              }
    }
    }
    return 0;
}
int main()
{
    int n;
    scanf("%d", &n);
    int i;
    double a, b, c, delta;
    double x1, x2;
    double shi1, xu1, shi2, xu2;
    for(i=1;i<=n;i++)
    {
        scanf("%lf%lf%lf", &a, &b, &c);
        delta=b*b-4*a*c;
        if(delta>=0)
        {
            x1=(-b+sqrt(delta))/(2*a);
            x2=(-b-sqrt(delta))/(2*a);
            if(x1!=x2)
            printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
            if(x1==x2)
            printf("x1=x2=%.5lf\n", x2);
        }
        if(delta<0)
        {
            shi1=shi2=-b/(2*a);
            xu1=sqrt(-delta)/(2*a);
            xu2=-sqrt(-delta)/(2*a);
            printf("x1=%.5lf", shi1);
            if(xu1>0)
            printf("+%.5lfi", xu1);
            if(xu1<0)
            printf("%.5lfi", xu1);
            printf(";x2=%.5lf", shi2);
            if(xu2>0)
            printf("+%.5lfi", xu2);
            if(xu2<0)
            printf("%.5lfi\n", xu2);
        }
    }

    return 0;
}
/*
 *???????(8.3) ????????? (1051)
 *??????
 *???2012?10?15? 18:15:34
 *?????????? ax2 + bx + c = 0 ?????a???0?
 */



int main(){
	float a=0.0,b=0.0,c=0.0;
	double x1=0.0,x2=0.0,x3=0.0,x4=0.0,D=0.0;
	int n=0;
	cin>>n;
	while(n--){
		cin>>a>>b>>c;
		D=b*b-4*a*c;
		if(D>=0){
			x1=(-b+sqrt(D))/(2*a) ;
			x2 =(-b-sqrt(D))/(2*a);
		}
		else{
			x3=(-b)/(2*a);
			x4=sqrt(-D)/(2*a);
		}
        if(x1==0){
			x1=0.0;
		}
		if(x2==0){
			x2-0.0;
		}
		if(x3==0){
			x3=0.0;
		}
		if(D>0){
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<";x2="<<x2<<endl;
		}
		  else if(D==0){
			  cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		  }
		    else{
				cout<<fixed<<setprecision(5)<<"x1="<<x3<<"+"<<x4<<"i;x2="<<x3<<"-"<<x4<<"i"<<endl;
			}
	}
	return 0;
}
int qj( double a,double b,double c)
{
    double x1,x2,e,f,g;
    double d;
    d=b*b-4*a*c;
    if (d>0)
       {  
       e=(-b + sqrt(d))/(2*a);
                    f=(-b -sqrt(d))/(2*a);
                    if(e==0)
                    e=0;
                   printf("x1=%.5f;x2=%.5f\n",e,f);
                   }
         else if (d==0)
                      {
                       e=(-b)/(2*a); 
                       if(e==0)
                    e=0;   
                       printf("x1=x2=%.5f\n",e);
                       }
          else
                       {
                       e=(-b)/(2*a);
                       f=sqrt(-d)/(2*a);
                       if(e==0)
                    e=0;
                       printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
                       }
}
main()
{
    double a,b,c;
    int n;
    int i;
    i=0; 
    scanf("%d\n",&n);
   while(i<n)
    {
    scanf("%lf%lf%lf",&a,&b,&c);
    qj(a,b,c);
    i++;
     }
             }
int main()
{
	int n,i;
	double a,b,c;
	scanf("%d\n",&n);

	for(i=0;i<n;i++){
		scanf("%lf %lf %lf",&a, &b, &c);
		if(b*b-4*a*c!=0){

		if(a>0){
			if(b*b-4*a*c>0){
				printf("x1=%.5lf;x2=%.5lf\n",(-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a));
			}
			else if(b*b-4*a*c<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 if(a<0){
			if(b*b-4*a*c>0){
				printf("x1=%.5lf;x2=%.5lf\n",(-b-sqrt(b*b-4*a*c))/(2*a),(-b+sqrt(b*b-4*a*c))/(2*a));
			}
			else if(b*b-4*a*c<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=x2=%.5lf\n",-b/(2*a));
		}
	}
	return 0;
}
/*
 * ?????????????.cpp
 * ?????1200012840
 * ?????2012-10-19
 * ???????
        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?
 */



int main()
{
	int i,n;//????
	double a,b,c,x1,x2;//????
	cin>>n;//??????
	for(i=1;i<=n;i++)//??for??
	{
		cin>>a>>b>>c;//??????
		if(b*b-4*a*c>0)//??delta?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);//?????x1,x2??
		}
		if(b*b-4*a*c==0)//??delta?0???
		{
			if(b!=0)//??b??
			x1=-b/(2*a);
			else x1=0;
			x1=-b/(2*a);
			printf("x1=x2=%.5f\n",x1);//?????x1,x2??
		}
		if(b*b-4*a*c<0)//??delta?0???
		{
			if(b!=0)//??b??
			  x1=-b/(2*a);
			else x1=0;
			     x2=sqrt(-b*b+4*a*c)/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);//?????x1,x2??

		}
	}
	return 0;//????
}
int main()
{
	int i,n;
	double a,b,c,x1,x2,dert,d,e;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
        dert=b*b-4*a*c;
		if(dert>0)
		{
	       x1=(-b+sqrt(dert))/(2*a);
		   x2=(-b-sqrt(dert))/(2*a);
		   printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		if(dert==0)
		{
			x1=(-b+sqrt(dert))/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		if(dert<0)
		{
			dert=-dert;
			d=(-b)/(2*a);
                           d=(d==-0)?(0):(d);
			e=sqrt(dert)/(2*a);
			e=(e>=0)?(e):(-e);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d,e,d,e);		}
	}
	return 0;
}
//============================================================================
// Name        : 6.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description :
//============================================================================


int main() {
	int n=0;
	cin>>n;
	double a[1000],b[1000],c[1000];

	double d[1000];
	for (int j=0;j<n;j++)
	{
		cin>>a[j]>>b[j]>>c[j];
		d[j]=b[j]*b[j]-4*a[j]*c[j];
	}
	for (int i=0;i<n;i++){
        if (d[i]>0)
		{
        	cout<<"x1=";
        	printf("%.5f",(-b[i]+sqrt(d[i]))/(2*a[i]));
        	cout<<";"<<"x2=";printf("%.5f",(-b[i]-sqrt(d[i]))/(2*a[i]));
        	cout<<endl;
        }
        else if (d[i]==0)
		{
			if (b[i]==0)
			{
				cout<<"x1=x2=0.00000";
			}
			else
			{
		    	cout<<"x1=x2=";
		    	printf("%.5f",(-b[i])/(2*a[i]));
		    	cout<<endl;
		    }
		}
        else
		{
			if (b[i]==0)
				{cout<<"x1=0.00000+";printf("%.5f",sqrt(c[i]/a[i]));cout<<"i;x2=0.00000";printf("%.5f",-sqrt(c[i]/a[i]));cout<<"i"<<endl;}
		    if (b[i]!=0)
			{cout<<"x1=";printf("%.5f",(-b[i])/(2*a[i]));cout<<"+";printf("%.5f",(sqrt(-d[i]))/(2*a[i]));cout<<"i"<<";"<<"x2=";printf("%.5f",(-b[i])/(2*a[i]));cout<<"-";printf("%.5f",(sqrt(-d[i]))/(2*a[i]));cout<<"i"<<endl;}
				}}
	return 0;
}
int main(int argc, char* argv[])
{
	int j, n;
	scanf("%d\n",&n);
	for(j=1;j<=n;j++)
	{   float a,b,c;
	    scanf("%f%f%f",&a,&b,&c);
	    double x1,x2,m,p;
        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);
		}
		else if ((b*b-4*a*c)==0)
		{
		    x1=x2=-b/(2*a);
			printf("x1=x2=%.5f\n",x1,x2);
		}
		else 
		{  
			m=-b/(2*a);
                           if (b==0)
                           m=0;
			p=sqrt(4*a*c-b*b)/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",m,p,m,p);
		    
        }
	}
}
int main()
{
	double a , b , c , x1 , x2 ;
	int n;
	cin >> n;
	for(int i = 0; i < n; i++)
	{
		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( x1 == 0 )
			    x1 = 0;
			if( x2 == 0)
				x2 = 0;
			cout << "x1=" ;
			printf("%.5lf", x1 );
			cout<< ";" << "x2=" ;
			printf("%.5lf\n", x2 );
		}
		else if( b * b - 4 * a * c == 0)
		{
			x1 = - b / ( 2*a );
			if( x1 == 0 )
			    x1 = 0;
			cout<<"x1=x2=";
		    printf("%.5lf\n",x1);
		}
		else
		{
			double m,n;
			m = sqrt( 4 * a * c - b * b )/( 2*a );
			n = - b / ( 2*a );
			if( b == 0)
				n = 0;
			cout << "x1=";
			printf( "%.5lf", n );
			cout << "+";
			printf( "%.5lf", m );
			cout << "i" << ";" << "x2=" ;
			printf( "%.5lf", n );
			cout << "-" ;
			printf( "%.5lf", m );
			cout << "i" << endl;
		}
	}
	return 0;
}
int main()
{
	double a[100],b[100],c[100],d[100],e[100],f[100];
	int n,i;
	double *aa,*bb,*cc,*dd,*ee,*ff;
	scanf("%d",&n);
	aa=a,bb=b,cc=c;
	for(i=0;i<n;aa++,bb++,cc++,i++)
	scanf("%lf %lf %lf",aa,bb,cc);
    aa=a,bb=b,cc=c,dd=d,ee=e,ff=f;
    for(i=0;i<n;aa++,bb++,cc++,dd++,ee++,ff++,i++)
	{
		
		(*dd)=(*bb)*(*bb)-4*(*aa)*(*cc);
        if((*dd)>0)
		{
			(*ee)=((-(*bb))+sqrt(*dd))/(2*(*aa));
			(*ff)=((-(*bb))-sqrt(*dd))/(2*(*aa));
			printf("x1=%.5lf;x2=%.5lf\n",*ee,*ff);
		}
		else if((*dd)==0)
		{
			(*ee)=0-(*bb)/(2*(*aa));
			printf("x1=x2=%.5lf\n",*ee);}

        else if((*dd)<0)
		{  (*ee)=((*bb)/(2*(*aa)));
		   (*ff)=(sqrt(0-(*dd)))/(2*(*aa));
		   printf("x1=-%.5lf+%.5lfi;x2=-%.5lf-%.5lfi\n",*ee,*ff,*ee,*ff);
		}
	}
}
int main()
{
	int n,i;
	double j,k,p;
	double a[100];
	double b[100];
	double c[100];
	double x1[100],x2[100],d[100];
	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++)
	{
		p=-b[i]/(2*a[i]);
		if(p==-0.00000)
		{
            p=0.00000;
		}
		d[i]=b[i]*b[i]-4*a[i]*c[i];
		if(d[i]==0)
		{
			x1[i]=x2[i]=-b[i]/(2*a[i]);
			printf("x1=x2=%.5lf\n",x1[i]);
		}
		if(d[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]);
            printf("x1=%.5lf;x2=%.5lf\n",x1[i],x2[i]);
		}
		if(d[i]<0)
		{
			j=p;
			k=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",j,k,j,k);
		}
	}
}
int main(int argc, char* argv[])
{
     double a,b,c,disc,x1,x2,p,q,N,m;
     scanf("%lf",&N);
	 
	 for(m=1;m<=N;m++){
		 scanf("%lf%lf%lf",&a,&b,&c);
	 disc=b*b-4*a*c;
         if(disc>0){
			 p=-b/(2*a);
             q=sqrt(disc)/(2*a);
             x1=p+q;
			 x2=p-q;
             printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		 }
     else if(disc==0){
        p=-b/(2*a);
              x1=p;
        printf("x1=x2=%.5lf\n",x1);
     }
     else if(disc<0,b/(2*a)==0){
		 p=b/(2*a);
		 q=sqrt(-disc)/(2*a);
		 x1=p+q;
		 x2=p-q;

		 printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
      }  
	 else{
		 p=-b/(2*a);
		 q=sqrt(-disc)/(2*a);
		 x1=p+q;
		 x2=p-q;

		 printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
      }   
   }
	return 0;
}
float f(double a,double b,double c)
{
    double x1,x2,A;
    A=b*b-4*a*c;
    if(A>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",x1,x2);
    };
    if(0==A)
    {
        x1=(-b+sqrt(b*b-4*a*c))/(2*a);
        printf("x1=x2=%.5f",x1);
    };
    if(A<0)
    {
        double x3,x4;
        x1=-b/(2*a);
        if(0==x1)
        {
        x1=0;
        }
        x3=sqrt(-(b*b-4*a*c)/(4*a*a));
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",x1,x3,x1,x3);
    };
    return 0;

}
main()
{
    double a[20],b[20],c[20];
    int i,n,t;
    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(i!=0)
        printf("\n");
        t=f(a[i],b[i],c[i]);
    }



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

	return 0;

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

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

		}
		    else if(b[j]*b[j] -a[j]*c[j] *4 < 0)
		    {
			x1 =(-b[j] )/(2*a[j]);
		    if (x1>-0.00001&&x1<0.00001)
		    {
		    	x1 =0;
		    }
			d =(sqrt(4*a[j]*c[j]-b[j]*b[j]))/(2*a[j]);
			cout <<"x1=";
		    printf("%.5f",x1);
		    cout<<"+";
		    printf("%.5f",d);
		    cout <<"i;x2=";
		    printf("%.5f",x1);
		    cout<<"-";
		    printf("%.5f",d);
		    cout<<"i" <<endl;
		    }

	    x1=0;
	    x2=0;
	    d =0;



	}
return 0;


}
int main(int argc, char* argv[])
{
	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 dt,m,n,x1,x2;
			dt=b[i]*b[i]-4*a[i]*c[i];
			
				m=-(b[i]/(2*a[i]));
			n=sqrt(fabs(dt))/(2*a[i]);
			if(dt==0){
				printf("x1=x2=%.5f\n",m);
			}
			else if(dt>0){
				x1=m+n;
				x2=m-n;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);
			}
			else{
				printf("x1=%.5f+%.5fi;",m,n);
                printf("x2=%.5f-%.5fi\n",m,n);
			}
			}
		}


	return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	double a[100],b[100],c[100];
	double x1[100],x2[100];
	double d,e,f;
	scanf ("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a[i],&b[i],&c[i]);
		d=(-1)*b[i]/(2*a[i]);
		e=b[i]*b[i]-4*a[i]*c[i];
		if (e>0)
		{
			x1[i]=d+sqrt(e)/(2*a[i]);
			x2[i]=d-sqrt(e)/(2*a[i]);
		    printf("x1=%.5lf;x2=%.5lf\n",x1[i],x2[i]);
        }
	    if(e==0)
		{
			x1[i]=d;
			x2[i]=d;
			printf("x1=x2=%.5lf\n",x1[i]);
		}
		if (e<0)
		{
			e=(-1)*e;
			f=sqrt(e)/(2*a[i]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",d,f,d,f);
		}
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int i;
    double a,b,c;
	double t;
	
	double p,q;
	double x1,x2;
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		t=b*b-4*a*c;
		if(t>0)
		{
			if (b==0)
			{
					x1=(sqrt(t))/(2*a);
			        x2=(- sqrt(t))/(2*a);
			}
			else
				
			
			
			
			{
				x1=(-b+sqrt(t))/(2*a);
			    x2=(-b - sqrt(t))/(2*a);
			}
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if (t==0)
		{
			if(b==0)
			{
				x1=x2=0;
			}
			else x1=x2=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else  
		{
			if (b==0)
			{
				p=0.00000;
			}
			else p=-b/(a*2);
			q=sqrt(-t)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
		}
	}
	return 0;
}
/*????:
1."if??\else if??\else"  ??
2.t==0 not t=0*/
main()
{
      int n;
      double a,b,c;
      double x1,x2;
      double Delta;
      scanf("%d\n",&n);
      for(int i=1;i<=n;i++)
      {
      scanf("%lf %lf %lf",&a,&b,&c);
      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);
      } 
      else if (fabs(Delta)<1e-7)
      {x1 = (-b )/(2*a); 
      printf("x1=x2=%.5f\n",x1);
      }
      else 
       {x1 = (-b + sqrt(-Delta))/(2*a); 
       x2 = (-b - sqrt(-Delta))/(2*a) ;
       
      if(fabs(b)<1e-7)
      printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\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=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-b/(2*a)),(sqrt(4*a*c-b*b)/(2*a)),(-b/(2*a)),(sqrt(4*a*c-b*b)/(2*a)));
      }
                         
      }
       
}
main()
{
	int n, i;
	/*n = 0;*/
 	scanf("%d",&n);
	float a[100],b[100],c[100];
	double x1, x2;
	for (i=1; i<=n; i++)
	{
		scanf("%f %f %f",&a[i-1], &b[i-1], &c[i-1]);
	}
	for (i=1; i<=n; i++)
	{
		if ((b[i-1]*b[i-1]-4*a[i-1]*c[i-1])>0)
		{
	x1 = (-b[i-1] + sqrt(b[i-1]*b[i-1]-4*a[i-1]*c[i-1]))/(2*a[i-1]);
	x2 = (-b[i-1] - sqrt(b[i-1]*b[i-1]-4*a[i-1]*c[i-1]))/(2*a[i-1]);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if ((b[i-1]*b[i-1]-4*a[i-1]*c[i-1]) == 0)
		{
	x1 = (-b[i-1] + sqrt(b[i-1]*b[i-1]-4*a[i-1]*c[i-1]))/(2*a[i-1]);
	x2 = (-b[i-1] - sqrt(b[i-1]*b[i-1]-4*a[i-1]*c[i-1]))/(2*a[i-1]);
			printf("x1=x2=%.5f\n",x1);
		}
		else if ((b[i-1]*b[i-1]-4*a[i-1]*c[i-1]) < 0)
		{
			double i1,i2;
			i1 = sqrt(-b[i-1]*b[i-1]+4*a[i-1]*c[i-1])/(2*a[i-1]);
			i2 = -b[i-1]/(2*a[i-1]);
                        if (i2 == -0.00000)
			{
				i2 = 0.00000;
			}
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",i2,i1,i2,i1);
		}
		
	}
	
}
int main()
{
	double a,b,c,d;
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		d=b*b-4*a*c;
	if(d>0)
		{
			cout<<fixed<<setprecision(5)<<"x1="<<((-b)+sqrt(d))/(2*a)<<";"<<"x2="<<((-b)-sqrt(d))/(2*a)<<endl;
	}
	else if(d==0)
	{
		cout<<fixed<<setprecision(5)<<"x1=x2="<<(-b)/(2*a)<<endl;
	}
	else
		{
			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)/(2*a)<<"+"<<sqrt(-d)/(2*a)<<"i"<<";"<<"x2="<<(-b)/(2*a)<<"-"<<sqrt(-d)/(2*a)<<"i"<<endl;
			}
	}
	}
    return 0;
}
int main()
{
	int n;
	float a,b,c;
	cin>>n;
	for(n;n>0;n--)
	{
		cin>>a>>b>>c;
		double m=-b/(2*a);
		double deta=b*b-4*a*c;
		if (m==-0)
			m=0;
		if(deta>1e-8)
			cout<<"x1="<<fixed<<setprecision(5)<<m+sqrt(deta)/(2*a)
				<<";x2="<<m-sqrt(deta)/(2*a)<<endl;
		else if(deta<=-1e-8)
			cout<<"x1="<<fixed<<setprecision(5)<<m<<"+"<<fabs(sqrt(-deta)/(2*a))<<"i"
			    <<";x2="<<m<<"-"<<fabs(sqrt(-deta)/(2*a))<<"i"<<endl;
		else
			cout<<fixed<<setprecision(5)<<"x1=x2="<<m<<endl;
	}
		
	return 0;
}
int main()
{
      int n,m;
      scanf("%d",&n);
      double a[500],b[500],c[500],x1,x2,e;
      for(m=1;m<=n;m++)
      {
                       scanf("%lf %lf %lf",&a[m],&b[m],&c[m]);
      }
      for(m=1;m<=n;m++)
      {
                       if((b[m]*b[m]-4*a[m]*c[m])==0)
                       {
                          x1=-b[m]/(2*a[m]),x2=-b[m]/(2*a[m]);
                          printf("x1=x2=%.5f\n",x1);
                       }
                       else if((b[m]*b[m]-4*a[m]*c[m])>0)
                       {
                          x1=(-b[m]+sqrt(b[m]*b[m]-4*a[m]*c[m]))/(2*a[m]);
                          x2=(-b[m]-sqrt(b[m]*b[m]-4*a[m]*c[m]))/(2*a[m]);
                          printf("x1=%.5f;x2=%.5f\n",x1,x2);
                       }
                       else
                          {
                             e=sqrt(-b[m]*b[m]+4*a[m]*c[m])/(2*a[m]);
                             if(b[m]==0)
                             printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",e,e);
                             else
                             {
                             x1=-b[m]/(2*a[m]);
                             printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,e,x1,e);
                             }
                          }
      }
      return 0; 
}