semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,i;
	double a[100],b[100],c[100],x1,x2,y1;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
		if((b[i]*b[i]-4*a[i]*c[i])>0)
		{
			x1=(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			x2=(-b[i]-sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			cout<<"x1="<<fixed<<setprecision(5)<<x1<<";"<<"x2="<<x2<<endl;
		}
		else if((b[i]*b[i]-4*a[i]*c[i])==0)
		{
			x1=(-b[i]+0)/(2*a[i]);
			x2=x1;
			cout<<"x1=x2="<<fixed<<setprecision(5)<<x1<<endl;
		}
		else if((b[i]*b[i]-4*a[i]*c[i])<0)
		{
			if(b[i]==0)y1=0;
			else
			{
				y1=(-b[i])/(2*a[i]);
			}
			x1=(sqrt(abs(b[i]*b[i]-4*a[i]*c[i])))/(2*a[i]);
			cout<<"x1="<<fixed<<setprecision(5)<<y1<<"+"<<x1<<"i"<<";"<<"x2="<<y1<<"-"<<x1<<"i"<<endl;
		}
	}
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2012-11-1
 *      Author: AK
 */
int main(){
	int n;
	double a,b,c,p;
	cin>>n;
	for(;n>=1;n--){
		cin>>a>>b>>c;
		p=b*b-4*a*c;
		if(p>0) cout<<"x1="<<fixed<<setprecision(5)<<0+(-b+sqrt(p))/(2*a)<<";x2="<<0+(-b-sqrt(p))/(2*a)<<endl;
		else if(p==0) cout<<"x1=x2="<<fixed<<setprecision(5)<<0+(-b)/(2*a)<<endl;
		else cout<<fixed<<setprecision(5)<<"x1="<<0+(-b)/(2*a)<<'+'<<sqrt(-p)/(2*a)<<"i;x2="<<0+(-b)/(2*a)<<'-'<<sqrt(-p)/(2*a)<<"i"<<endl;
		}
	return 0;
}
int main()
{
    int n,h=1;
    double a,b,c,e;
    double x1,x2,y;
    scanf("%d",&n);
    for(h=1;h<=n;h++)
    {
    scanf("%lf %lf %lf",&a,&b,&c);
    y=b*b-4*a*c;
    if(y>0)
    {
    x1=(-b+sqrt(y))/(2*a);
    x2=(-b-sqrt(y))/(2*a);
    if(c==0)
    printf("x1=0.00000;x2=%.5f\n",x2);
    else
    printf("x1=%.5f;x2=%.5f\n",x1,x2);
}
    else
    if(y==0)
    {
    x1=x2=(-b)/(2*a);
    printf("x1=x2=%.5f\n",x1);
}
    else
    {
    e=(sqrt(-y))/(2*a);
    if(b==0)
    printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",0.00000,e,0.00000,e);
    else
    printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-b)/(2*a),e,(-b)/(2*a),e);
}
}
    getchar();
    getchar();
    getchar();
}
main()
{     double a,b,c,a1,a2;
      int n,d; 
      d = 1;
      scanf ("%d",&n);
      while (d <= n)      
      {
       scanf ("%lf %lf %lf",&a,&b,&c);
       a1 = -b/(2*a);
       if (a1 == 0)
       a1 = 0;
       else a1 = -b/(2*a);
       if ((b*b-4*a*c)==0)
      {a2 = 0;
      printf ("x1=x2=%.5lf\n",a1);}
       else if ((b*b-4*a*c)<0)
      {a2 = (sqrt ( 4 * a* c-b * b))/(2 * a);
       printf ("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",a1,a2,a1,a2);}
      else if ((b*b-4*a*c)>0)
      {a2 = (sqrt (b * b - 4 * a* c))/(2 * a);
      printf ("x1=%.5lf;x2=%.5lf\n",a1+a2,a1-a2);} 
      d = d + 1;
     }
}
int main()
{   int n,i;
    scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		double a,b,c,d,x1,x2;
		scanf("%lf%lf%lf",&a,&b,&c);
	    
	    d=(double)b*b-4*a*c;
	    if(d<0)
		{double m,n;
		 m=-b/(2*a);
		 n=(sqrt(4*a*c-b*b))/(2*a);
	     printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
		}
	    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=%.5lf;x2=%.5lf\n",x1,x2);
		 else	
	     printf("x1=x2=%.5lf\n",x1,x2);	  
			}
	}
	
	return 0;
}
int main()
{
    int n;
    int i;
    scanf("%d",&n);
    double a[100],b[100],c[100],x1[100],x2[100],re[100],im[100];
    double dlta[100];
    for(i=0;i<n;i++)
    {
        scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
    }
    for(i=0;i<n;i++)
    {
        dlta[i]=b[i]*b[i]-4*a[i]*c[i];
        if(dlta[i]==0)
        {
            x1[i]=-b[i]/a[i]/2;
            printf("x1=x2=%.5lf\n",x1[i]);
        }
        else if(dlta[i]<0)
        {
            im[i]=sqrt(0-dlta[i])/2/a[i];
            re[i]=-b[i]/a[i]/2;
            if(re[i]==0)
            {
                re[i]=0;
            }
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",re[i],im[i],re[i],im[i]);
        }
        else
        {
            x1[i]=(-b[i]+sqrt(dlta[i]))/2/a[i];
            x2[i]=(-b[i]-sqrt(dlta[i]))/2/a[i];
            printf("x1=%.5lf;x2=%.5lf\n",x1[i],x2[i]);
        }
    }
}
int main()
{
   double a,b,c,x1,x2,del,m,l;
   int n,i;
   scanf("%d\n",&n);
	   for(i=1;i<=n;i++)
	   {
		   scanf("%lf %lf %lf",&a,&b,&c);
		   del=b*b-4*a*c;m=-b/(2*a);
		       if (del>1e-6) 
			   { 
				   l=sqrt(del)/(2*a);
				   x1=m+l;
				   x2=m-l;
				   printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			   }
			   else if (fabs(del)<=1e-6) printf("x1=x2=%.5lf\n",m);
			   else 
			   {
				   l=sqrt(-del)/(2*a);
				   if (m!=0) printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,l,m,l);
				   else printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",l,l);
			   }
			   

	   }
   return 0;

}
int main ()
{
    int n;
    cin >>n;
    for (int i=1;i<=n;i++)
    {
        double a,b,c,d,e,x,y;
        cin >>a>>b>>c;
        d=b*b-4*a*c;
        e=-b/2/a;
        if (e==-0)
            e=0;
        if (d>0)
        {
            x=e+sqrt(d)/2/a;
            y=e-sqrt(d)/2/a;
            cout <<fixed<<setprecision(5)<<"x1="<<x<<";x2="<<y<<endl;
        }
        if (d==0)
        {
            cout <<fixed<<setprecision(5)<<"x1=x2="<<e<<endl;
        }
        if (d<0)
        {
            x=sqrt(-d)/2/a;
            cout <<fixed<<setprecision(5)<<"x1="<<e<<"+"<<x<<"i;x2="<<e<<"-"<<x<<"i"<<endl;
        }
    }
    return 0;
}
int main()
{
	double a, b, c, x1, x2, n;
	cin >> n ;
	for (double k = 1 ; k <= n ; k++)
	{
			cin >> a >> b >> c ;
			x1 = (-b + sqrt(b * b - 4 * a * c)) / (2 * a) ;
            x2 = (-b - sqrt(b * b - 4 * a * c)) / (2 * a) ;
		if (sqrt(b * b - 4 * a * c) > 0)
		{
			cout << "x1=" ;
		    printf ("%.5f",x1) ;
			cout << ";" << "x2=" ;
			printf ("%.5f",x2) ;
			cout << endl ;
		}
		else
		{
			if (sqrt(b * b - 4 * a * c) == 0)
			{
				cout << "x1=x2=" ;
		        printf ("%.5f",x1) ;
				cout << endl ;
			}
			else
			{
				cout << "x1=" ;
				if (b == 0)
					printf ("%.5f",(b / (2 * a))) ;
				else
		        printf ("%.5f",(-b / (2 * a))) ;
				cout << "+" ;
				printf ("%.5f",(sqrt(abs(b * b - 4 * a * c)) / (2 * a)));
				cout << "i" << ";" ;
				cout << "x2=" ;
				if (b == 0)
					printf ("%.5f",(b / (2 * a))) ;
				else
		        printf ("%.5f",(-b / (2 * a))) ;
				cout << "-" ;
				printf ("%.5f",(sqrt(abs(b * b - 4 * a * c)) / (2 * a)));
				cout << "i" ;
				cout << endl ;
			}
		}
	}
		return 0;
}
int main()
{
	int i,j,n;
	float a[100],b[100],c[100],d[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	    scanf("%f",&a[i]);
		scanf("%f",&b[i]);
		scanf("%f",&c[i]);
	}
	for(i=0;i<n;i++)
	{
		d[i]=b[i]*b[i]-4*a[i]*c[i];
		if(d[i]==0)
			printf("x1=x2=%.5f\n",(-b[i])/(2*a[i]));
		if(d[i]>0&&c[i]==0)
		       printf("x1=0.00000;x2=%.5f\n", (-b[i]-sqrt(d[i]))/(2*a[i]));
	    if(d[i]>0&&c[i]!=0)
			   printf("x1=%.5f;x2=%.5f\n",(-b[i]+sqrt(d[i]))/(2*a[i]), (-b[i]-sqrt(d[i]))/(2*a[i]));

		if(d[i]<0)
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b[i]/(2*a[i]),sqrt(-d[i])/(2*a[i]),-b[i]/(2*a[i]),sqrt(-d[i])/(2*a[i]));
	}
	return 0;
}
main()
{
      int n,i;
      scanf("%d",&n);
      double a,b,c,d;
  
		
				
	  for (i=1;i<=n;i++)
   		{
        scanf("%lf %lf %lf",&a,&b,&c);
		d=b*b-4*a*c;
       	
		if (d==0)
			printf("x1=x2=%.5lf\n",-b/(2*a));
		else
			{	if (d>0)
			       if ((-b)/(2*a)<0.00001 && ((-b)/(2*a))>-0.00001 )
			          
			          printf("x1=0.00000+%.5lf;x2=0.00000-%.5lf\n",sqrt(d)/(2*a),sqrt(d)/(2*a));
			       else
			           printf("x1=%.5lf;x2=%.5lf\n",(-b+sqrt(d))/(2*a),(-b-sqrt(d))/(2*a));
				else if ((-b)/(2*a)<0.00001&& (-b)/(2*a)>-0.00001 )
			          printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",sqrt(-d)/(2*a),sqrt(-d)/(2*a));
			       else
					printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-b/(2*a),sqrt(-d)/(2*a),-b/(2*a),sqrt(-d)/(2*a));
			}   
		}
   
      
}
int main()
{
	int number;
	float a, b, c;
	double delta=0;
	scanf("%d",&number);
	while ( number -- )
	{
		scanf("%f %f %f", &a, &b, &c);
		delta = b*b-4*a*c;
		if ( delta > 0 )
		{
			double x1,x2;
			x1 = (-b + sqrt(delta))/(2*a); 
			x2 = (-b - sqrt(delta))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else
		{
			if ( delta == 0 )
			{
				double x = (-b)/(2*a);
				printf("x1=x2=%.5f\n", x);
			}
			else
			{
			delta = -delta;if(b==0){double xfront=b/(2*a);


				double xbehind = sqrt(delta)/(2*a);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", xfront, xbehind, xfront, xbehind);}else{		double xfront = (-b)/(2*a);double xbehind = sqrt(delta)/(2*a);printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", xfront, xbehind, xfront, xbehind);}
			}
		}
	}
}
int main()
{
	int i,j;
	double a,b,c,d,e,f,m,n,h;
	scanf ("%d\n",&j);
	for (i=1;i<=j;i++)
	{
		scanf ("%lf%lf%lf",&a,&b,&c);
	    h=b*b-4*a*c;
	    if (h>0)
		{
		d=(-b+sqrt(h))/(2*a);
	    e=(-b-sqrt(h))/(2*a);
		printf("x1=%.5lf;x2=%.5lf\n",d,e);}
		if (h==0)
		{
		f=(-b)/(2*a);
		printf ("x1=x2=%.5lf\n",f);}
		if (h<0)
		{
		m=(-b)/(2*a);	n=sqrt(-h)/(2*a);
	    printf ("x1=%.5lf+%.5lfi;",m,n);
        printf ("x2=%.5lf-%.5lfi\n",m,n);
		}}
		return 0;
}
void main()
{
	int n,g;
scanf("%d",&n);
double a[100],b[100],c[100],x1,x2,disc,rp,ip;
for(g=0;g<=n-1;g++)
{
	scanf("%lf%lf%lf",&a[g],&b[g],&c[g]);
}
for(g=0;g<=n-1;g++)
{
disc=b[g]*b[g]-4*a[g]*c[g];
if(fabs(disc)<=1e-6)
{
printf("x1=x2=%.5lf\n",-b[g]/(2*a[g]));
}
else
if(disc>1e-6)
{
	x1=(-b[g]+sqrt(disc))/(2*a[g]);
	x2=(-b[g]-sqrt(disc))/(2*a[g]);
	printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
}
else
{
if(b[g]==0)
{
	rp=0;
ip=sqrt(-disc)/(2*a[g]);
	printf("x1=%.5lf+%.5lfi;",rp,ip);
	printf("x2=%.5lf-%.5lfi\n",rp,ip);
}
else
{
	rp=-b[g]/(2*a[g]);
	ip=sqrt(-disc)/(2*a[g]);
	printf("x1=%.5lf+%.5lfi;",rp,ip);
	printf("x2=%.5lf-%.5lfi\n",rp,ip);
}
}
}
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int i;
	for(i=1;i<=n;i++){
		double a, b,c,x1,x2;
		scanf("%lf%lf%lf",&a,&b,&c);
		if ((b*b-4*a*c)==0){
			x1=-(b/(2*a));
			printf("x1=x2=%.5lf\n",x1);
		}
		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=%.5lf;x2=%.5lf\n",x1,x2);
			}
			else{
				double m,n;
				m=-b/(2*a);
                                    if (b==0){
                                           m=0.00000;
                                    }
				n=sqrt(4*a*c-b*b)/(2*a);
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
			}
		}
	}
	return 0;
}
main()
{
      int i,n;
      scanf("%d",&n);
      double a[n],b,c,x[n],y[n];
      for(i=0;i<n;i++)
      {
            scanf("%lf %lf %lf",&a[i],&b,&c);
            y[i]=(b*b-4*a[i]*c);
            if(b==0)
            x[i]=(b)/(2*a[i]);
            else
            x[i]=(-b)/(2*a[i]);
      }
      for(i=0;i<n;i++)
      {
              if(y[i]==0)
                printf("x1=x2=%.5f\n",x[i]);
              else if (y[i]>0)
                {
                y[i]=sqrt(y[i])/(2*a[i]);      
                printf("x1=%.5f;x2=%.5f\n",x[i]+y[i],x[i]-y[i]);
                }
              else
                {
                y[i]=sqrt(-y[i])/(2*a[i]);
                printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x[i],y[i],x[i],y[i]);  
                }              
      }

}
int main()
{
    int n,ri;
    double a, b, c, d;
    scanf("%d", &n);
    for(ri = 1; ri <= n; ri++){
        scanf("%lf %lf %lf", &a, &b, &c);
    d=b*b-4*a*c;
	if(a==0){if(b==0){if(c==0){printf("???????????!\n");}
	else{printf("a?b?0?c??0??????\n");}}
	else{printf("x=%.5f\n", -c/b);}
	}
	else{if(d>0){printf("x1=%.5f;", (-b+sqrt(d))/(2*a));
	printf("x2=%.5f\n", (-b-sqrt(d))/(2*a));}
	else{if(d==0){printf("x1=x2=%.5f\n", (-b+sqrt(d))/(2*a));}
    else{if(d<0){if(b==0){printf("x1=%.5f+%.5fi;",b/(2*a), sqrt(-d)/(2*a));printf("x2=%.5f-%.5fi\n", b/(2*a), sqrt(-d)/(2*a));}
    else{if(d<0){if(b!=0){printf("x1=%.5f+%.5fi;",-b/(2*a), sqrt(-d)/(2*a));printf("x2=%.5f-%.5fi\n", -b/(2*a), sqrt(-d)/(2*a));}  
    } 
    }    
    }
    }
    }       
    }
    }
}
int main()
{
	int n,i,j;
	double a[100][3],x1,x2,y;
	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++)
	{
		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]);
			printf("x1=%.5lf;",x1);
			printf("x2=%.5lf\n",x2);
		}
		if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]==0)
		{
			x1=(-a[i][1])/(2*a[i][0]);
			printf("x1=x2=%.5lf\n",x1);
		}
		if(a[i][1]*a[i][1]-4*a[i][0]*a[i][2]<0)
		{
			if(a[i][1]==0)
			{
				y=(sqrt(-a[i][1]*a[i][1]+4*a[i][0]*a[i][2]))/(2*a[i][0]);
				printf("x1=0.00000+%.5lfi;",y);
				printf("x2=0.00000-%.5lfi\n",y);
			}
			else if(a[i][1]!=0)
			{
			    x1=(-a[i][1])/(2*a[i][0]);
			    y=(sqrt(-a[i][1]*a[i][1]+4*a[i][0]*a[i][2]))/(2*a[i][0]);
			    printf("x1=%.5lf+%.5lfi;",x1,y);
			    printf("x2=%.5lf-%.5lfi\n",x1,y);
			}
		}
	}
	return 0;
}
int main()
{
    int n,k,j;
    double num[100][100]={0},a,b,c,x1,x2,i;
    scanf("%d",&n);
    i=sqrt(-1);
    for(k=0;k<=n-1;k++)
    {
     scanf("%lf %lf %lf",&num[k][0],&num[k][1],&num[k][2]);
     a=num[k][0];
     b=num[k][1];
     c=num[k][2];
     if((b*b-4*a*c)>=0)
     {
      num[k][3]= (-b + sqrt(b*b-4*a*c))/(2*a);
      num[k][4]= (-b - sqrt(b*b-4*a*c))/(2*a);
      }
     else 
     {
      if(b==0.00000)
      {num[k][3]=0.00000;}
      else
      {
      num[k][3]= (-b)/(2*a);
       }
      num[k][4]=sqrt(4*a*c-b*b)/(2*a);
      num[k][5]=sqrt( 4*a*c-b*b)/(2*a);  
          }
     //printf("\n");//
     }
    for(j=0;j<=n-1;j++)
     {
     k=j;
     if(num[k][1]*num[k][1]-4*num[k][0]*num[k][2]>=0)
       {
        if(num[k][3]!=num[k][4])
        {printf("x1=%.5lf;x2=%.5lf\n",num[k][3],num[k][4]);}
        else {printf("x1=x2=%.5lf\n",num[k][3]);}
       }
     else {printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",num[k][3],num[k][4],num[k][3],num[k][5]);}
     }
     getchar();
     getchar();
     return 0;
}
int main ()
{
	int n ,j;
	cin >> n;
	double cha , x1,x2;
	float a[100], b[100], c[100];
	for(j = 0 ; j < n; j++)
	{
		cin >> a[j] >> b[j] >> c[j];
		cha =(double) b[j]* b[j] - 4 * a[j] * c[j];
		if(cha > 0)
		{
			x1 = (-b[j] + sqrt(cha))/(2*a[j]);
			x2 = (-b[j] - sqrt(cha))/(2*a[j]);
			cout <<fixed << setprecision(5)<< "x1="<< x1 << ";" <<"x2="<< x2 << endl;
		}
		else if (cha == 0)
			cout <<fixed << setprecision(5) <<"x1=x2="<<-b[j]/(2*a[j])<<endl;
		else
		{  double i = -b[j]/(2*a[j]);
			cout << fixed << setprecision(5) <<"x1="<<i<<"+"<<sqrt(-cha)/(2*a[j])<<"i"<<";"<<"x2="<<i<<"-"<<sqrt(-cha)/(2*a[j])<<"i"<<endl;
		}
	}
	return 0;
}
main (){
  int n,i;
  double delta,p,q,x1,x2;
  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]);
             delta=b[i]*b[i]-4*a[i]*c[i];
               p=-(b[i]/(2*a[i]));
			   q=sqrt(fabs(delta))/(2*a[i]);
   	        if(delta==0)
			{
		       printf("x1=x2=%.5f\n",p);}
	          else if(delta>0)
			  {
		        x1=p+q;
		        x2=p-q;
		         printf("x1=%.5f;x2=%.5f\n",x1,x2);}
	         else
			 {
	             printf("x1=%.5f+%.5fi;",p,q);
				 printf("x2=%.5f-%.5fi\n",p,q);
			 }
		}
return 0;
}
/*
 * return.cpp
 *
 *  Created on: 2014-1-25
 *      Author: ???
 */
int main()
{
	int n;
	double a,b,c,d;
	cin>>n;
	cout<<fixed<<setprecision(5);
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		if(b==0)
			b=-b;
		d=b*b-4*a*c;
		if(d==0)
		{
			cout<<"x1=x2="<<(-b)/(2*a)<<endl;
		}
		else if(d>0)
		{
			cout<<"x1="<<(-b+sqrt(d))/(2*a)<<";x2="<<(-b-sqrt(d))/(2*a)<<endl;
		}
		else
		{
			double xd=sqrt(-d)/(2*a);
			cout<<"x1="<<(-b)/(2*a)<<'+'<<xd<<"i;x2="<<(-b)/(2*a)<<'-'<<xd<<'i'<<endl;
		}
	}
	return 0;
}
void main()
{
	int n,i=1;
	double a,b,c,x1,x2,d,e,y,z;
	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)
		{
			e=sqrt(d);
			x1=(-b+e)/(2*a);
			x2=(-b-e)/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		if (d==0)
		{
			e=sqrt(d);
			x1=x2=(-b+e)/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		if (d<0)
		{
			y=-b/(2*a);
			z=sqrt(-d)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",y,z,y,z);
		}
	}
}
/*
 * 004.cpp
 *
 *  Created on: 2012-9-28
 *  Author: ???
 *  ??:???????????????
 */

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

	return 0;
}
int main()
{
	int n;
	float a,b,c;
	scanf("%d",&n);
	while(n--){
		scanf("%f %f %f",&a,&b,&c);
		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;x2=%.5f\n",(-b+sqrt((b*b-4*a*c)))/(2*a),(-b-sqrt((b*b-4*a*c)))/(2*a));
		if((b*b-4*a*c)<0)
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),(sqrt((-b*b+4*a*c))/(2*a)),-b/(2*a),(sqrt((-b*b+4*a*c))/(2*a)));
		
	}
	return 0;
}
main()
{
      int n,i;
      float a,b,c;
      double x,y,z,x1,x2;
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
        scanf("%f %f %f",&a,&b,&c);
        if(fabs(b*b-4*a*c)<1e-6)
            {
              x1=-b/(2*a),x2=-b/(2*a);
              printf("x1=x2=%.5f\n",x1);
            }
        else if(b*b-4*a*c>1e-6)
        {
            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
        {
            x=-b/(2*a),y=sqrt(4*a*c-b*b)/(2*a);
            if(fabs(x)<1e-6)x=-x;
            printf("x1=%0.5f+%0.5fi;x2=%0.5f-%0.5fi\n",x,y,x,y);
        }
        }
                   }
int main()
{
	double a,b,c;
	double x1,x2;
	int n;
	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 = (-b)/(2*a);
			x2 = (-b)/(2*a);	
			cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		}
		else
		{
			if (b==0)
			{
				cout<<fixed<<setprecision(5)<<"x1="<<(0)/(2*a)<<"+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<";"<<"x2="<<(0)/(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;
			}
			
		}
	}
	return 0;
}
int main()
{
	int n,k;
	double a[100],b[100],c[100],x1,x2,d;
	cin>>n;
	for (k=0;k<n;k++)
	{
		cin>>a[k]>>b[k]>>c[k];
		d=b[k]*b[k]-4*a[k]*c[k];
		if (d>0)
			x1=(-b[k]+sqrt(d))/(2*a[k]),
			x2=(-b[k]-sqrt(d))/(2*a[k]),
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		else if (d==0)
			x1=x2=-b[k]/(2*a[k]),
			printf("x1=x2=%.5f\n",x1);
		else
			d=sqrt(-d)/(2*a[k]),
			x1=x2=-b[k]/(2*a[k]),
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,d,x2,d);
	}
	return 0;
}
int main()
{
	double a,b,c;
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a>>b>>c;
	double delta=b*b-4*a*c;
	if(delta==0){cout<<"x1=x2=";//?????Delta 
	printf("%.5f",((-b/(2*a))));
	cout<<endl;}
	else if(delta>0){
	cout<<"x1=";
	printf("%.5f",((-b+sqrt(delta))/(2*a)));
	cout<<";"<<"x2=";
	printf("%.5f",((-b-sqrt(delta))/(2*a)));
	cout<<endl;}
	if(delta<0){
		delta=-delta;
		cout<<"x1=";
	if(b==0){
     	printf("%.5f",(b/(2*a)));}
	    else {printf("%.5f",(-b/(2*a)));}
		cout<<"+";printf("%.5f",(sqrt(delta)/(2*a)));
		cout<<"i"<< ";x2=";
		if(b==0){
     	printf("%.5f",(b/(2*a)));}
	    else {printf("%.5f",(-b/(2*a)));}
		cout<<"-";
		printf("%.5f",(sqrt(delta)/2/a));
		cout<<"i"<< endl;
	}} return 0;
}
int main()
{int n,i;
double a,b,c,x1,x2;
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*a*c))/(2*a);x2=(-b-sqrt(b*b-4*a*c))/(2*a);
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);
cout<<"x1=x2=";printf("%.5f",x1);cout<<endl;}else
{x1=-b/(2*a);x2=(sqrt(4*a*c-b*b))/(2*a);
if (x2<0) x2=-x2; 
if (x1==-0) x1=0;
cout<<"x1=";printf("%.5f",x1);cout<<"+";printf("%.5f",x2);cout<<"i;";
cout<<"x2=";printf("%.5f",x1);cout<<"-";printf("%.5f",x2);cout<<"i"<<endl;
                                                
                                                 }
    
    }

    
    
        }
//****************************
//??????????????
//?????? 1300012849
//???2013?10?14?
//****************************


int main ()
{
int n , i ;                                      //??????n
double a , b , c ;                               //????????????????a?b?c
double delta , x1 , x2 , k1 , k2;                //????delta?????x1,x2 ?k1, k2?????????????

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

for ( i = 1 ; i <= n ; i++ )                     //?n???
{
     cin >> a >> b >> c ;                        //????a?b?c
     delta = b * b - 4 * a * c ;                 //?????
    
	 if ( delta > 0 )                            //??????0????????????????
     {
         x1 = ( -b + sqrt ( delta ) ) / ( 2 * a ) ;
         x2 = ( -b - sqrt ( delta ) ) / ( 2 * a ) ;
        
		 if ( x1 < 0.000001 && x1 > -0.000001)   //???????-0.00000??0.00000????
		 {x1 = 0 ;}
	    		 cout<< fixed ;                          //???????????????5??????????
	     cout << setprecision(5) << "x1="<< x1 <<";"<< "x2="<< x2 << endl ;
	 }
     
	 else if ( delta == 0 )                      //??????0????
     {
		 x1 = -b / ( 2 * a ) ;
         x2 = -b / ( 2 * a ) ;
		 
		 if ( x1 < 0.000001 && x1 > -0.000001)
			x1 = 0 ;
	     if ( x2 < 0.000001 && x1 > -0.000001)
			x2 = 0 ;
		 cout << fixed ;
         cout << setprecision(5) << "x1=x2="<< x1 << endl ;
	 }

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