semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,j;
	float x[100],y[100],z[100];
         double x1,x2,p,q,a,b,c;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%f%f%f",&x[j],&y[j],&z[j]);
	}
	for(j=1;j<=n;j++)
	{
		a=x[j];
		b=y[j];
		c=z[j];
		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);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(b*b==4*a*c)
		{
			x1=-b/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		else
		{
			p=-b/(2*a);
			q=sqrt(4*a*c-b*b);
			q=q/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
		}
	}

}
//*****************************
//*  ??? ???????    *
//*  ??? 1100012820        *
//*  ?? 20110915            *
//*****************************


int main()
{
	int i, n;                  //????n?????i
	double a, b, c, det;           //????????????????;
	cin>>n;                   //??????n
	
	cout<<fixed<<setprecision(5);
	for (i=1; i<=n; i++)      //????????
	{
		cin>>a>>b>>c;         //?????
		det = b * b - 4 * a * c;   //?????
		if (det < 0)            //???????0
		{
			if (a > 0)          //??a??0
				cout<<"x1="<<b / a / (-2) + 1 - 1
					<<"+"<<sqrt(fabs(det))/ a / 2
					<<"i;x2="<<-(b / a / 2) + 1 - 1
					<<-sqrt(fabs(det))/ a / 2
					<<"i"<<endl;
			               //???????
			else       //??a??0
				cout<<"x1="<<(-b) / a / 2
					<<"+"<<sqrt(fabs(det))/ a / 2
					<<"i;x2="<<-(b / a / 2)
					<<-sqrt(fabs(det))/ a / 2
					<<"i"<<endl;
			               //???????
		}
		else if (det == 0)    //???????0
			cout<<"x1=x2="<<(-b) / a / 2<<endl;
	                 //??????
		else               //????????0?
			cout<<"x1="
				<<(- b + sqrt(b * b - 4 * a * c)) / (2 * a)
				<<";x2="
				<<( - b - sqrt( b * b - 4 * a * c)) / (2 * a)
				<<endl;
	                 //???????
		             //????
	}    //????
	return 0;
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int i;
         

    double a[200],b[200],c[200],disc[100],X1[100],X2[100],realpart[100],imagpart[100];
	
	for(i=0;i<n;i++)
	{scanf("%lf%lf%lf\n",&a[i],&b[i],&c[i]);}
          disc[i]=b[i]*b[i]-4*a[i]*c[i];
	for(i=0;i<n;i++)
	{
            disc[i]=b[i]*b[i]-4*a[i]*c[i];
           if(fabs(disc[i])<=1e-6)
	   {
		  printf("x1=x2=%.5f\n",-b[i]/(2*a[i]));
	   }
	   else if(disc[i]>1e-6)
	   {
		   X1[i]=(-b[i]+sqrt(disc[i]))/(2*a[i]);
		   X2[i]=(-b[i]-sqrt(disc[i]))/(2*a[i]);
		   printf("x1=%.5f;x2=%.5f\n",X1[i],X2[i]);
	   }
	   else
	   {
		   realpart[i]=-b[i]/(2*a[i]);
		   imagpart[i]=sqrt(-disc[i])/(2*a[i]);
		   if(fabs(realpart[i])<=1e-6)
                        {
		        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-realpart     [i],imagpart[i],-realpart[i],imagpart[i]);
                        }
                      else{printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart[i],imagpart[i],realpart[i],imagpart[i]);}

	   }
	}
	return 0;
}
int main() {
	int n;
	cin >>n;
	for (;n>0;n=n-1)
	{
		double a,b,c,d,x1,x2,x1re,x1im,x2re,x2im;//a,b,c are the output.  d is the discriminant.
		cin >>a>>b>>c;
		d=b*b-4*a*c;
		if (d>=0)
		{
			if(b!=0)//used to avoid the output of -0.00000+...
		    {
			x1=(-b+sqrt(d))/(2*a);
		    x2=(-b-sqrt(d))/(2*a);
		          if (x1!=x2)
		          {
		                cout <<fixed<<setprecision(5)<<"x1="<<x1;
		                cout <<";";
		                cout <<fixed<<setprecision(5)<<"x2="<<x2<<endl;
		           }
		          else
		                cout <<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
            }
			else//used to avoid the output of -0.00000+...
		    {
			x1=(sqrt(d))/(2*a);
			x2=(sqrt(d))/(2*a);
			      if (x1!=x2)
			      {
					    cout <<fixed<<setprecision(5)<<"x1="<<x1;
					    cout <<";";
					    cout <<fixed<<setprecision(5)<<"x2="<<x2<<endl;
				  }
				  else
					    cout <<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		     }
		}

		else
		{
			if(b!=0)//used to avoid the output of -0.00000+...
			{
				x1re=-b/(2*a);
				x2re=-b/(2*a);
				x1im=(sqrt(-d))/(2*a);
				x2im=-(sqrt(-d))/(2*a);
				cout <<noshowpos<<fixed<<setprecision(5)<<"x1="<<x1re<<showpos<<x1im<<"i";//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
				cout <<";";
				cout <<noshowpos<<fixed<<setprecision(5)<<"x2="<<x2re<<showpos<<x2im<<"i"<<endl;//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
			}
			else//used to avoid the output of -0.00000+...
			{
				x1re=0;
				x2re=0;
				x1im=(sqrt(-d))/(2*a);
				x2im=-(sqrt(-d))/(2*a);
				cout <<noshowpos<<fixed<<setprecision(5)<<"x1="<<x1re<<showpos<<x1im<<"i";//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
				cout <<";";
				cout <<noshowpos<<fixed<<setprecision(5)<<"x2="<<x2re<<showpos<<x2im<<"i"<<endl;//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
			}
		}
	}
	return 0;
}
main()
{
      int n;
      scanf("%d",&n);
      double e[100][3];
      int i;
      for(i=0;i<n;i++)
      {
                      scanf("%lf %lf %lf",&e[i][0],&e[i][1],&e[i][2]);
      }
      double a[100][2];
      for(i=0;i<n;i++)
      {
                      if((e[i][1]*e[i][1]-4*e[i][0]*e[i][2])>0)
                      {
                           a[i][0]=(-e[i][1] + sqrt(e[i][1]*e[i][1]-4*e[i][0]*e[i][2]))/(2*e[i][0]);
                           a[i][1]=(-e[i][1] - sqrt(e[i][1]*e[i][1]-4*e[i][0]*e[i][2]))/(2*e[i][0]);
                           printf("x1=%.5lf;x2=%.5lf\n",a[i][0],a[i][1]);
                      }
                      if((e[i][1]*e[i][1]-4*e[i][0]*e[i][2])==0)
                      {
                           a[i][0]=(-e[i][1])/(2*e[i][0]);
                           a[i][1]=(-e[i][1])/(2*e[i][0]);
                           printf("x1=x2=%.5lf\n",a[i][0]);
                      }
                      if((e[i][1]*e[i][1]-4*e[i][0]*e[i][2])<0)     
                      {
                           char c='i'; 
                           double p,q;
                           if(e[i][1]==0)
                           {              
                                p=(e[i][1])/(2*e[i][0]);
                                q=(sqrt(4*e[i][0]*e[i][2]-e[i][1]*e[i][1]))/(2*e[i][0]);
                                printf("x1=%.5lf+%.5lf%c;x2=%.5lf-%.5lf%c\n",p,q,c,p,q,c);
                           }
                           else
                           {
                               p=(-e[i][1])/(2*e[i][0]);
                               q=(sqrt(4*e[i][0]*e[i][2]-e[i][1]*e[i][1]))/(2*e[i][0]);
                               printf("x1=%.5lf+%.5lf%c;x2=%.5lf-%.5lf%c\n",p,q,c,p,q,c);
                           }
                      }
      }
      getchar();
      getchar();
      getchar();
      getchar();
      getchar();
      getchar();
      getchar();
      getchar();
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d/n",&n);
	double a=0,b=0,c=0;
	for(;n>0;n--){
		scanf("%lf %lf %lf",&a,&b,&c);
	
   double x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
   double x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
   if((b*b-4*a*c)>0){  
	   printf("x1=%.5f;x2=%.5f\n",x1,x2);}
    else if((b*b-4*a*c)==0){
	   printf("x1=x2=%.5f\n",x2);}
   else if((b*b-4*a*c)<0){
	   double c1,d1,d2;
		   c1=(double)(-b/(a*2));
		   d1=sqrt(4*a*c-b*b)/(2*a);
		   d2=-d1;
		   if(c1==-0){
		   printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n",-c1,d1,-c1,d2);}
		   else {printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n",c1,d1,c1,d2);}}}
	   return 0;

}
int main()
{
	int n,i;
	double a,b,c,disc,x1,x2,realpart,imagpart;
	scanf("%d",&n);
	i=0;
	
	while(i<n)
	
	{
	 scanf("%lf %lf %lf",&a,&b,&c);
     if(fabs(a)<=1e-6)
		 printf("error\n",a);
     else 
	 { disc=b*b-4*a*c;
	   if(fabs(disc)<=1e-6) 
		   printf("x1=x2=%.5lf\n",-b/(2*a));
	   else
	   {
		   if(disc>1e-6)
		   {
			   x1 = (-b + sqrt(disc))/(2*a);
               x2 = (-b - sqrt(disc))/(2*a);
           printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		   }
		   else
		   {
			   realpart=-b/(2*a);
			   imagpart=sqrt(-disc)/(2*a);
			   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",realpart,imagpart,realpart,imagpart);
			   
		   }
	   }
	 }

      i++;


		   
    }
		 
	 
	
	
	return 0;
}
int main()
{
	int i, n;
	double *p, a,b,c, dt, x1, x2;
	
	scanf("%d",&n);
	p=malloc(sizeof(double)*3*n);

	for(i=0; i<n; i++)
	{
		scanf("%lf %lf %lf", p+i*3, p+i*3+1, p+i*3+2);
	}

	for(i=0; i<n; i++)
	{
		a=*(p+i*3);
		b=*(p+i*3+1);
		c=*(p+i*3+2);
		dt=b*b-4*a*c;
		
		if(dt>0)
		{
			x1 = (-b + sqrt(dt))/(2*a);
			x2 = (-b - sqrt(dt))/(2*a);
			printf("x1=%.5f;x2=%.5f\n", x1, x2);
		}
		else if(fabs(dt)<0.00001)
		{
			x1=-b/(2*a);
			printf("x1=x2=%.5f\n", x1);
		}
		else
		{
			x1 = (-b)/(2*a);
			if(fabs(x1)<0.00001)
				x1=0;
			x2 = sqrt(-dt)/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", x1, x2, x1, x2);
		}
	}

}
int main()
{
 int n,j;
 double a[100],b[100],c[100],p,q,u,x1,x2;
 char r,s,t;
 r='i';
 s='+';
 t='-';
 scanf("%d",&n);
 for(j=0;j<n;j++){ 
  scanf("%lf %lf %lf",&a[j],&b[j],&c[j]);
p=(-b[j])/(2*a[j]);
q=b[j]*b[j]-4*a[j]*c[j];
if (p!=0)
{
if (q>0)
{x1=p+sqrt(q)/(2*a[j]);
x2=p-sqrt(q)/(2*a[j]);
printf("x1=%.5lf;x2=%.5lf\n",x1,x2); }
else if (q<0){
u=sqrt(-q)/(2*a[j]);
printf("x1=%.5lf%c%.5lf%c;x2=%.5lf%c%.5lf%c\n",p,s,u,r,p,t,u,r);}
else 
printf("x1=x2=%.5lf\n",p);
}
else
{p=(b[j])/(2*a[j]);
if (q>0)
{x1=p+sqrt(q)/(2*a[j]);
x2=p-sqrt(q)/(2*a[j]);
printf("x1=%.5lf;x2=%.5lf\n",x1,x2); }
else if (q<0){
u=sqrt(-q)/(2*a[j]);
printf("x1=%.5lf%c%.5lf%c;x2=%.5lf%c%.5lf%c\n",p,s,u,r,p,t,u,r);}
else 
printf("x1=x2=%.5lf\n",p);
}
 }
}
int main()
{
	int m=0,n;
	double a,b,c,d,x1,x2,x1i,x2i;
	scanf("%d",&n);
	do{
		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;",x1);
				printf("x2=%.5lf\n",x2);
			}
		else if(b*b-4*a*c==0)
			{
				x1=-b/(2*a);
				printf("x1=x2=%.5lf\n",x1);
			}
		else
			{
				x1=-b/(2*a);
				x1i=sqrt(4*a*c-b*b)/(2*a);
				x2=-b/(2*a);
				x2i=-sqrt(4*a*c-b*b)/(2*a);
				if(b/(2*a)==0)
					{
						x1=0;
						x2=0;
					}
				printf("x1=%.5lf+%.5lfi;",x1,x1i);
				printf("x2=%.5lf%.5lfi\n",x2,x2i);
			}
		m++;
	}while(m<n);
		return 0;
}
void 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);
		}
		if((b*b-4*a*c)==0)
		{
     	    x1 = -b /(2*a);
			x2 = -b /(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		if((b*b-4*a*c)<0)
		{
			x1 =-b /(2*a);
			x2=sqrt(-b*b+4*a*c)/(2*a);
                            if(x1==0)
			{
				x1=b/(2*a);
			}
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
		}
	}

}
int main()
{
	int n;
	scanf("%d\n",&n);
	
	int i;
	i=1;
	do
	{ double a,b,c;
	scanf("%lf%lf%lf\n",&a,&b,&c);
	double x1,x2,disc,realpart,imagpart;
		disc=b*b-4*a*c;
	if(fabs(disc)<=1e-6)
	printf("x1=x2=%.5f\n",-b/(2*a));
	else if(disc>1e-6)
	{
		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);
    if(b==0) printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,imagpart,b,imagpart);
	else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart,imagpart,realpart,imagpart);
	}
		i++;
	}
	while(i<=n);
	
}
//****************************************
//*????????????                                  **
//*??????  1100012927       **
//*???2011.09.16                          **
//****************************************

int main()
{
    int n;
    double a,b,c,delta,x1,x2,x1r;
    cin>>n;
    do{cin>>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",x1);
            cout<<";";
            printf("x2=%.5f",x2);
            cout<<""<<endl;}
        else if  (delta==0) {x1=(b)/(2*a);
            printf("x1=x2=%.5f",-x1);
            cout<<""<<endl;}
        else if  (delta<0) {delta=-delta;  
            x1=(sqrt(delta))/(2*a);
            x2=(-sqrt(delta))/(2*a);
            x1r=(-b)/(2*a);
            if  (x1r==0)
            { printf("x1=%.5f+",(-x1r));
            printf("%.5fi",x1);
            cout<<";";
            printf("x2=%.5f",(-x1r));
            printf("%.5fi",x2);
                cout<<""<<endl;}
            else { printf("x1=%.5f+",(x1r));
                printf("%.5fi",x1);
                cout<<";";
                printf("x2=%.5f",(x1r));
                printf("%.5fi",x2);
                cout<<""<<endl;}        }
        
        n=n-1;
    }while(n>=1);
    return 0;}
int main()
{
	int n, i;
	double a, b, c;
	double x1, x2, real,imaginary;
	scanf("%d", &n);
    double temp; 

	for( i=0; i<n; i++)
	{
		scanf("%lf%lf%lf", &a, &b, &c);
		temp = b*b - 4*a*c;
			if( temp >0 )
		{
			x1 = (-b+sqrt(temp))/(2*a);
			x2 = (-b-sqrt(temp))/(2*a);
          printf("x1=%.5f;x2=%.5f\n", x1, x2); 
		}	
		else if( temp == 0 )
		{
			x1 = -b/(2*a);
         printf("x1=x2=%.5f\n", x1);
		
		}
		else   
		{
			real =-b/(2*a);
			imaginary = sqrt(-temp)/(2*a);
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", real, imaginary, real, imaginary); 

		
		}
	}
}
int main()
{int n,i;
double a,b,c,x1,x2,delta,p,q;
cin>>n;
for (i=1;i<=n;i++)
{
cin>>a>>b>>c;
delta=b*b-4*a*c;
if (delta>0)
{x1= (-b + sqrt(delta))/(2*a) ;
 x2 = (-b - sqrt(delta))/(2*a);
 cout<<"x1="<<fixed<<setprecision(5)<<x1<<";"<<"x2="<<fixed<<setprecision(5)<<x2<<endl;
}
if (delta==0)
{x1=(-b)/(2*a);
 cout<<"x1=x2="<<fixed<<setprecision(5)<<x1<<endl;
}
if (delta<0)
{p=(-b)/(2*a);
 q=sqrt(-delta)/(2*a);
 if (b==0)
 {p=0;
 }
 cout<<"x1="<<fixed<<setprecision(5)<<p<<"+"<<fixed<<setprecision(5)<<q<<"i;"<<"x2="<<fixed<<setprecision(5)<<p<<"-"<<fixed<<setprecision(5)<<q<<"i"<<endl;
}
}
return 0;
}
int main()
{
	int n,i=1;
	double a,b,c,x1,x2,m,e,f;
	scanf("%d",&n);
	while((i<=n)&&a!=0)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		m=b*b-4*a*c;
		e=(-b+sqrt(b*b-4*a*c))/(2*a);
		   f=(-b-sqrt(b*b-4*a*c))/(2*a);
		   if(b!=0)
		   {
		if((e!=f)&&(m>=0))
		{
           x1=(-b+sqrt(b*b-4*a*c))/(2*a);
		   x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if((m>=0)&&(e=f))
		{
			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);
		}
		else
		{
			x1=-b/(2*a);
			x2=sqrt(-m)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
		}
		   }
		   else 
		   {if((e!=f)&&(m>=0))
		{
           x1=(sqrt(b*b-4*a*c))/(2*a);
		   x2=(-sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if((m>=0)&&(e=f))
		{
			x1=(sqrt(b*b-4*a*c))/(2*a);
		x2=(-sqrt(b*b-4*a*c))/(2*a);
		printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			x1=-b/(2*a);
			x2=sqrt(-m)/(2*a);
			printf("x1=-0.00000+%.5lfi;x2=-0.00000-%.5lfi\n",x2,x2);
		}
		   }
		   i++;
	}
return 0;
}
int main()
{ double a,b,c,x1,x2,t1,t2;
  int i,j,n;
    scanf("%d",&n);
  for(i=1;i<n+1;i++)
    {scanf ("%lf %lf %lf",&a,&b,&c);
     
   x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
   x2 = (-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)+0,sqrt(-(b*b-4*a*c))/(2*a),-b/(2*a)+0,sqrt(-(b*b-4*a*c))/(2*a));
   else
   if (x1==x2) printf("x1=x2=%.5f\n",x1); 
   else 
     printf("x1=%.5f;x2=%.5f\n",x1,x2);
}
 
   return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int j;
	float a[10],b[10],c[10];
	for(j=0;j<n;j++)
	{
		scanf("%f %f %f",&a[j],&b[j],&c[j]);
		double d;
		d=b[j]*b[j]-4*a[j]*c[j];
		if(d==0)
		{
			double e,f;
		    e=(-b[j])/(2*a[j]);
	    	f=(sqrt(d))/(2*a[j]);
		    if(e==0)
			e=0;
		    if(f==0)
			f=0;
			printf("x1=x2=%.5f\n",e);
		}
		else if(d>0)
		{
			double e,f;
		    e=(-b[j])/(2*a[j]);
	    	f=(sqrt(d))/(2*a[j]);
		    if(e==0)
			e=0;
		    if(f==0)
			f=0;
			printf("x1=%.5f;x2=%.5f\n",e+f,e-f);
		}
		else if(d<0)
		{
			double e,f;
		    e=(-b[j])/(2*a[j]);
	    	f=(sqrt(-d))/(2*a[j]);
		    if(e==0)
			e=0;
		    if(f==0)
			f=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
		}
	}
	return 0;
}
void main()
{
    int i=0,n;
    double a,b,c;
    scanf("%d",&n);
    while(i<n)
    {
        scanf("%lf%lf%lf",&a,&b,&c);
        if(b*b-4*a*c>0)
        {
            printf("x1=%.5f;x2=%.5f",(-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<1e-7&&b*b-4*a*c>-1e-7)
        {
            printf("x1=x2=%.5f",-b/(2*a));
        }
        else if(b/(2*a)<1e-7&&b/(2*a)>-1e-7)
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",0.0,(1/(2*a))*sqrt(4*a*c-b*b),0.0,(1/(2*a))*sqrt(4*a*c-b*b));
        else
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",-b/(2*a),(1/(2*a))*sqrt(4*a*c-b*b),-b/(2*a),(1/(2*a))*sqrt(4*a*c-b*b));
        i++;
        printf("\n");
    }
}
int main()
{
	int i,n;
	double a,b,c,x1,x2,disk,l[100],p[100],q[100],realpart,imagpart;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&l[i],&p[i],&q[i]);
	}
	for(i=0;i<n;i++)
	{
		a=l[i];
		b=p[i];
		c=q[i];
		disk=b*b-4*a*c;
		if(disk>0)
		{
			x1 = (-b + sqrt(disk))/(2*a);
            x2 = (-b - sqrt(disk))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(disk==0)
		{
            x2 = (-b - sqrt(disk))/(2*a);
			printf("x1=x2=%.5f\n",x2,x2);
		}
		else
		{
			realpart= (-b)/(2*a);
            if(realpart==0) realpart=fabs(realpart);
            imagpart= fabs(sqrt(-disk)/(2*a));
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart,imagpart,realpart,imagpart);
		}
	}
	return 0;
}
int main()
{
	int n,i;
	float a[1000],b[1000],c[1000];
	float delta,p,q,x1,x2;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
		scanf("%f %f %f",&a[i],&b[i],&c[i]);
	for(i=0;i<=n-1;i++)
	{
		delta=b[i]*b[i]-4*a[i]*c[i];
		p=-b[i]/(2*a[i]);
		if(delta==0)
		{
			printf("x1=x2=%.5f\n",p);
		}
		else
		{
			if(delta>0)
			{
				q=sqrt(delta)/(2*a[i]);
				x1=p+q;
				x2=p-q;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);
			}
			else
			{
				delta=-delta;
				q=sqrt(delta)/(2*a[i]);
				if(b[i]==0)
				{
					p=fabs(p);
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
				}
				else
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
			}
		}
	}
	return 0;
}
int main()
{
	char x1,x2;
	int n;
	float a,b,c;
	scanf("%d",&n);
	int i;
	for(i=1;i<=n;i++)
	{
		scanf("%f%f%f",&a,&b,&c);
		float e;
		e=b*b-4*a*c;
		if(e>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));
		else
			if(e==0.0)
			printf("x1=x2=%.5f\n",(-b)/(2*a));
			else
				if(b==0)
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(b)/(2*a),sqrt(-e)/(2*a),(b)/(2*a),(sqrt(-e))/(2*a));
				else
printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-b)/(2*a),sqrt(-e)/(2*a),(-b)/(2*a),(sqrt(-e))/(2*a));
	}
	return 0;
}
//********************************
//*????6.cpp   **
//*?????? 1300012966 **
//*???2013.  **
//*????????????  **
//********************************
int main()
{
	int n, i;
	double a[100], b[100], c[100], d, x1, x2, e, f;
	cin >> n;
	for (i=1; i<=n; i++)
	{
		cin >> a[i] >> b[i] >> c[i];
	} //????
	for (i=1; i<=n; i++)
	{
		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]);
			cout << "x1=";
			printf ("%.5f", x1);
			cout << ";" << "x2=";
			printf ("%.5f\n", x2); 
		} //?????????
		if (d == 0)
		{
			x1 = - b[i] / (2 * a[i]);
			if (x1 == 0)
			{
				x1 = 0;
			}
			cout << "x1=x2=";
			printf ("%.5f\n", x1);
		} //?????????
		if (d < 0)
		{
			e = - b[i] / (2 * a[i]);
			if (e == 0)
			{
				e =0;
			}
			f = sqrt(- d) / (2 * a[i]);
			cout << "x1=";
			printf ("%.5f", e);
			cout << "+";
			printf ("%.5f", f);
			cout << "i" << ";" << "x2=";
			printf ("%.5f", e);
			cout << "-";
			printf ("%.5f", f);
			cout << "i" << endl;
		} //???????
	}
	return 0;
}
int main()
{
double a,b,c,x1,x2,d;
int n;
scanf("%d",&n);
int i;
for(i=0;i<n;i++)
{
scanf("%lf%lf%lf",&a,&b,&c);
d=b*b-4.0*a*c;
if(d>0)
{
x1=(-b+sqrt(d))/(2.0*a);
x2=(-b-sqrt(d))/(2.0*a);
printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
}
else if(d==0)
{
    printf("x1=x2=%.5lf\n",-b/(2.0*a));
}
else
{
double p=sqrt(-d)/(2.0*a);
if(b/(2*a)!=0)
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-b/(2.0*a),p,-b/(2.0*a),p);
else
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",b/(2.0*a),p,b/(2.0*a),p);}
}
return 0;
}
main()
{
  double a,b,c,s,x1,x2;
  int n,i;
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {
  scanf("%lf %lf %lf",&a,&b,&c);
  s=b*b-4*a*c;
  if(s>0) printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(s))/(2*a)+0,(-b-sqrt(s))/(2*a)+0);
  else if(s==0) printf("x1=x2=%.5f\n",-b/(2*a)+0);
  else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a)+0,sqrt(-s)/(2*a)+0,-b/(2*a)+0,sqrt(-s)/(2*a)+0);
  }
  
}
int main(int argc, char* argv[]) 
{   
	 
	int n,r=1;
    float a,b,c,a1,a2;
    double x1,x2,w;
	scanf("%d",&n);
	while (r<=n)
	{
		scanf("%f%f%f",&a,&b,&c);
		r++;
        x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
        x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
	   if (b*b-4*a*c>0)
		   printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	   else 
	   {
		   if (b*b-4*a*c==0)
		    printf("x1=x2=%.5lf\n",x1);
		   else 
		   {
		      a1 = (-b)/(2*a); 
              a2 = (-b)/(2*a);
			  w = sqrt(-(b*b-4*a*c))/(2*a);
			  if (b!=0)
		       printf ("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",a1,w,a2,w);
			  else
               printf ("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",w,w);
		   }
	   
	   }
	}
       
	return 0;
}
main()
{
   int i,n;
   double d,e,p,q,t,a[100],b[100],c[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++)
   {
     t=b[i]*b[i]-4*a[i]*c[i]; 
     if(t<0)
     {
            d=-b[i]/(a[i]*2);
            p=sqrt(-t)/(2*a[i]);
            q=sqrt(-t)/(2*a[i]);
            if(d==0) 
               {
                     d=0.00000;
                     }
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",d,p,d,q);
            }
     else if(fabs(t-0)<0.00000001)
     {
            d=-b[i]/(2*a[i]);
            printf("x1=x2=%.5lf\n",d);
            }
     else 
     {
            d=(-b[i]+sqrt(t))/(2*a[i]);
            e=(-b[i]-sqrt(t))/(2*a[i]);
            printf("x1=%.5lf;x2=%.5lf\n",d,e);
     }
   }
}
void main()
{
 int i=1,n;
 double  x1,x2,m,t,a,b,c;
 scanf("%d\n",&n);
 while(i<=n)
 {
 scanf("%lf%lf%lf\n",&a,&b,&c);
       if(b*b==a*c*4)
	   {  
		   x1=(-b)/(2*a);
		   printf("x1=x2=%.5lf\n",x1);
	   } 
	   else
	   {
	       if(b*b>4*a*c)
		   {

			   x1=(0-b + sqrt(b*b-4*a*c))/(2*a) ;
			   x2=(0-b - sqrt(b*b-4*a*c))/(2*a);
				   printf("x1=%.5lf;",x1);
			       printf("x2=%.5lf\n",x2);
		   }
		   else
		   {
		      m=sqrt(0-b*b+4*a*c)/(2*a);
			 
			  t=-b/(2*a);
			  if(t==0)
			  {
				  t=-t;
			  printf("x1=%.5lf+%.5lfi;",t,m);
			  printf("x2=%.5lf-%.5lfi\n",t,m);
			  }
			  else
			  {
			   printf("x1=%.5lf+%.5lfi;",t,m);
			  printf("x2=%.5lf-%.5lfi\n",t,m);
			  }

		   }
	   }
   i=i+1;
 }
 
}
int main()
{
	int n;
	double a, b, c, delta;
	double real1, real2, i1, i2, x1, x2;
	int zero(double a);
	scanf("%d", &n);
	while (n > 0)
	{
		scanf("%lf %lf %lf", &a, &b, &c);
		delta = b * b - 4 * a * c;
		if (zero(delta) == 1)
		{
			x1 = (-b + sqrt(delta)) / (2 * a);
			x2 = (-b - sqrt(delta)) / (2 * a);
//			if (!zero(x1)) x1 = 0; 
//			if (!zero(x2)) x2 = 0;
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if (zero(delta) == 0)
		{
			x1 = (-b + sqrt(delta)) / (2 * a);
//			if (!zero(x1)) x1 = 0;
			printf("x1=x2=%.5lf\n", x1);
		}
		else 
		{
			delta = -delta;
			real1 = -b / (2 * a);
			real2 = -b / (2 * a);
			i1 =  sqrt(delta) / (2 * a);
			i2 =  sqrt(delta) / (2 * a);
//			if (!zero(real1)) real1 = 0;
//			if (!zero(real2)) real2 = 0;
//			if (!zero(i1)) i1 = 0;
//			if (!zero(i2)) i2 = 0;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", real1, i1, real2, i2);
		}
		n--;
	}
	return 0;
}
int zero(double a)
{
	if (fabs(a) > 1e-6) 
		if (a > 0) return 1;
		else return -1;
	else return 0;
}