semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//???
//1100012822
//?????????
//2011?9?15?

int main()
{
    int n;
    double a , b ,c , x1 , x2 , t;
    cin>>n;
    while (n--)
    {
    cin>>a>>b>>c;
    cout<<setprecision(5)<<fixed;
    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 == x2)
                {
                    cout<<"x1=x2="<<x1<<endl;
                }
            else
                {
                    cout<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
                }
        }
    else
        {
            t = -b/(2 * a);
            if (abs(t)<1e-6) t=abs(t);
            cout<<"x1="<<t<<"+"<<(sqrt(-b * b + 4 * a * c))/(2 * a)<<"i";
            cout<<";";
            cout<<"x2="<<t<<"-"<<(sqrt(-b * b + 4 * a * c))/(2 * a)<<"i"<<endl;
        }
    }
    return 0;
}
int main()
{
	int n,i;
	double result[1000][3];
	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)
		{   result[i][0]=1;
			result[i][1]=(-b + (sqrt(b*b-4*a*c)))/(2*a);
			result[i][2]=(-b - (sqrt(b*b-4*a*c)))/(2*a); 
		}
		else if (b*b-4*a*c<0)
		{
			result[i][0]=2;
			result[i][1]=(-b)/(2*a);
			result[i][2]=(sqrt(4*a*c-b*b))/(2*a);
		}
		else
		{
			result[i][0]=3;
			result[i][1]=(-b + sqrt(b*b-4*a*c))/(2*a);
		}
	}
    for (i=0;i<n;i++)
	{
		if ((int)result[i][0]==1)
		{
			printf("x1=%.5f;x2=%.5f\n", result[i][1],result[i][2]);
		}
		else if ((int)result[i][0]==2)
		{
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", result[i][1],result[i][2],result[i][1],result[i][2]);
		}
		else
		{
			printf("x1=x2=%.5f\n", result[i][1]);
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	double x1[11],x2[11],disc[11],real[11],imag[11];
	float a[11],b[11],c[11];
	scanf ("%d",&n);
	for(;n>11;)
	{
		printf("Wrong input,please input again.\n");
		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++)
	{
		disc[i]=b[i]*b[i]-4*a[i]*c[i];
			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 if (disc[i]<=1e-6&&disc[i]>=-1e-6)
			{
				x1[i]=-b[i]/(2*a[i]);
				printf("x1=x2=%.5f\n",x1[i]);
			}
			else
			{
				real[i]=-b[i]/(2*a[i]);
				imag[i]=sqrt(-disc[i])/(2*a[i]);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",real[i],imag[i],real[i],imag[i]);
			}
	}
	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 delta,m,n,x1,x2;
			delta=b[i]*b[i]-4*a[i]*c[i];
			if(b[i]==0)
				m=0;
			else
				m=-(b[i]/(2*a[i]));
			n=sqrt(fabs(delta))/(2*a[i]);
			if(delta==0){
				printf("x1=x2=%.5f\n",m);
			}
			else if(delta>0){
				x1=m+n;
				x2=m-n;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);
			}
			else{
				if (b[i]==0){
				printf("x1=-%.5f+%.5fi;",m,n);
				printf("x2=-%.5f-%.5fi\n",m,n);
				}
				else{
				printf("x1=%.5f+%.5fi;",m,n);
				printf("x2=%.5f-%.5fi\n",m,n);
				}
			}
		}
	}
	return 0;
}
main()
{
  int n,i;   
  double  a[999],b[999],c[999],x1,x2,d;
  scanf("%d",&n);

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

	return 0;
}
int main()
{
    int n;
    scanf("%d", &n);
    while(n--){
        double a, b, c;
        scanf("%lf%lf%lf", &a, &b, &c);
        double d = b*b-4*a*c;
        double mid = -b/(2*a);
        double dif = sqrt(fabs(d))/(2*a);
        if(mid == 0)mid = 0;
        if(d > 0)printf("x1=%.5f;x2=%.5f\n", mid+dif, mid-dif);
        if(d == 0)printf("x1=x2=%.5f\n", mid);
        if(d < 0)printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", mid, fabs(dif), mid, fabs(dif));
    }
    return 0;
}
int main()
{   
	int n,i;
	float a,b,c,delta;
	double x1,x2,p,q;
	scanf("%d\n",&n);
	for(i=1;i<=n;i++)
	{
    scanf("%f%f%f\n",&a,&b,&c);
	delta=b*b-4*a*c;
	if(delta>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(delta==0)
	{
		x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
		x2=x1;
		printf("x1=x2=%.5lf\n",x1);
	}
	else
	{
		p=-b/(2*a);
        q=sqrt(-delta)/(2*a);
		if(p==-0)
			p=0;
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
	}
	}
		return 0;
}
int main(int argc, char* argv[])
{
	int n,j;
	double a[100],b[100],c[100];
	double x1,x2,xi,x0;
	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]);
			if(x1!=x2)printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			else printf("x1=x2=%.5lf\n",x1);
		}
		
		if((b[j]*b[j]-4*a[j]*c[j])<0){
			xi=sqrt(-b[j]*b[j]+4*a[j]*c[j])/(2*a[j]);
			x0=b[j]/(2*a[j]);
			if (x0!=0)x0=-x0;
			
			printf("x1=%.5lf+%.5lfi;",x0,xi);
			printf("x2=%.5lf-%.5lfi\n",x0,xi);
			
		}
		
	}   
	
	return 0;
}
int main ()
{
    int n,i;
    double a,b,c,x1,x2,a1,a2,b1,b2;
    scanf("%d",&n);
    for(i=0;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=(-b+sqrt(b*b-4*a*c))/(2*a);
               printf("x1=x2=%.5lf\n",x1);
                }
                else
                {
                    a1=(-b)/(2*a);
                    a2=(-b)/(2*a);
                    b1=sqrt(4*a*c-b*b)/(2*a);
                    b2=sqrt(4*a*c-b*b)/(2*a);
                    printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",a1,b1,a2,b2);
                    }
        }
    return 0;
    }
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
	double a,b,c;
	cin>>a>>b>>c;
	double delta=b*b-4*a*c;
	double x1,x2;
	if(delta>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(delta==0) 
{
	cout<<fixed<<setprecision(5)<<"x1=x2="<<(-b/(2*a))<<endl;
}
else if(delta<0)
{
	if(-b/(2*a)==-0) b=-b;
	delta=-delta;
		cout<<fixed<<setprecision(5)<<"x1="<<-b/(2*a)<<"+"<<sqrt(delta)/(2*a)<<"i;x2="<<-b/(2*a)<<"-"<<sqrt(delta)/(2*a)<<"i"<<endl;
	
}
}
		
return 0;
}
main()
{
      int n,i;
      float a[100],b[100],c[100];
      double d=0,x1,x2;
      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++)
       {
                        d=b[i]*b[i]-4.0*a[i]*c[i]; 
                        if(d>=0.001)
                         {
                           x1 = (-b[i]+sqrt(d))/(2.0*a[i]);
                           x2 = (-b[i]-sqrt(d))/(2.0*a[i]);
                           printf("x1=%.5f;",x1);
                           printf("x2=%.5f\n",x2);         
                         } 
                        if(d<0.001&&d>-0.001) 
                         {
                           x1= (-b[i])/(2.0*a[i]);
                           printf("x1=x2=%.5f\n",x1); 
                         }
                        if(d<=-0.001)
                        {
                          double m,n;
                          m=-b[i]/(2.0*a[i]);
                          n=sqrt(-d)/(2.0*a[i]);
                          if (m==0) printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",n,n); 
                          else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",m,n,m,n); 
                        } 
       }
getchar(); getchar();getchar();getchar();
}
/*
 * ?????????.cpp
 *?????????
 *  Created on: 2012-10-12
 *      Author: ???
 */
int main()
{
 int n,i;
 float a,b,c;
 double d,e,f,x1,x2;  //????
 cin>>n;              //?????????
 for(i=n;i>=1;i--)    //??????
 {
 cin>>a>>b>>c;        //???????
 d=b*b-4*a*c;         //?????
 if(d>0)              //??????
 {
     x1=(0-b+sqrt(d))/(2*a);
     x2=(0-b-sqrt(d))/(2*a);    //?????
     cout<<fixed<<setprecision(5)<<"x1="<<x1<<';'<<"x2="<<x2<<endl;
 }
 if(d==0)             //??????
 {
      x1=(0-b)/(2*a);
      cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;  //x1??x2
 }
 if(d<0)             //??????
 {
        e=(sqrt(-d))/(2*a);
        f=(0-b)/(2*a);
        cout<<fixed<<setprecision(5)<<"x1="<<f<<"+"<<e<<"i"<<";"<<"x2="<<f<<-e<<"i"<<endl;
 }
 }
 return 0;
}                        //????
int main()
{
    int n,i;
    scanf("%d",&n);
    double a,b,c,disc,x1,x2,realpart,imagpart;
    for(i=1;i<=n;i++)
    {
    scanf("%lf %lf %lf",&a,&b,&c);
    disc=b*b-4*a*c;
    if(fabs(disc)<=1e-6)
      {
              x1=-b/(2*a);
              x2=-b/(2*a);
              printf("x1=x2=%7.5f\n",x1); 
      }
    else
    if(disc>1e-6)
    {
               x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
               x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
               printf("x1=%7.5f;x2=%7.5f\n",x1,x2);
    }
    else
    {
        realpart=-b/(2*a);
        imagpart=sqrt(-disc)/(2*a);
        if(realpart==0)
        printf("x1=0.00000+%7.5fi;x2=0.00000-%7.5fi\n",imagpart,imagpart);
        else
        printf("x1=%7.5f+%7.5fi;x2=%7.5f-%7.5fi\n",realpart,imagpart,realpart,imagpart);
    }
    }
    return 0;
}
int main()
{
	int n;
	int i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
        double a,b,c,x1,x2;
		double t;
		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 = (-b + sqrt(b*b-4*a*c))/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			char s;
			s=i;
            x1 = sqrt(4*a*c-b*b)/(2*a);
            x2 = sqrt(4*a*c-b*b)/(2*a);
			t  = -b/(2*a);
			if(t!=0)
                printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",t,x1,t,x2);
			else
            {
				t=0;
            	printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",t,x1,t,x2);
			}
		}
	}
        return 0;
}
int main(int argc, char* argv[])
{ int n,i;
  
  scanf("%d\n",&n);
  struct{
	  double a,b,c;
  }xs[100];
  for(i=0;i<n;i++){
	  scanf("%lf %lf %lf\n",&xs[i].a,&xs[i].b,&xs[i].c);
  }
  for(i=0;i<n;i++){
	  double a1,b1,c1;
	  a1=xs[i].a;
	  b1=xs[i].b;
	  c1=xs[i].c;
	  if((b1*b1-4*a1*c1)>0){
		  double x1,x2;
		  x1=(-b1+sqrt(b1*b1-4*a1*c1))/(2*a1);
		  x2=(-b1-sqrt(b1*b1-4*a1*c1))/(2*a1);
		  printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	  }
	  if((b1*b1-4*a1*c1)==0){
		  double x1,x2;
		  x1=x2=(-b1)/(2*a1);
		  printf("x1=x2=%.5lf\n",x1);
	  }
	  if((b1*b1-4*a1*c1)<0){
		  double t1,t2;
		  t1=(-b1)/(2*a1);
          t2=sqrt(4*a1*c1-b1*b1)/(2*a1);
		  if(t1==-0.00000)
			  printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",t2,t2);
		  else {
		      printf("x1=%.5lf+%.5lfi;",t1,t2);
		      printf("x2=%.5lf-%.5lfi\n",t1,t2);
		  }
	  }
  }

	return 0;
}
int n;
int main()
{
	scanf("%d",&n);
	for(int i = 1;i <= n;i ++){
		double a,b,c;
		double x1 = 0,x2 = 0;
		scanf("%lf%lf%lf",&a,&b,&c);
		if(b * b - 4 * a * c > 0){
			x1 = (-1 * b + sqrt(b * b - 4 * a * c)) / (2 * a);
			x2 = (-1 * 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 = (-1 * b + sqrt(b * b - 4 * a * c)) / (2 * a);
			printf("x1=x2=%.5lf\n",x1);
			}
			else{
				x1 = sqrt(4 * a * c - b * b) / (2 * a);
				if(b == 0)
				printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",x1,x1);
				else
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(-1 * b) / (2 * a),x1,(-1 * b) / (2 * a),x1);
			}
		}
	}
	return 0 ;
}
int main(int argc, char* argv[])
{
	int n,i;
	scanf("%d",&n);
	double a,b,c,x1,x2,t,t1,t2;
	for(i=0;i<n;i++){
		scanf("%lf %lf %lf",&a,&b,&c);
		t=b*b-4*a*c;
		if(t>0){
			printf("x1=%.5lf;x2=%.5lf\n",x1=(-b+sqrt(t))/(2*a),x2=(-b-sqrt(t))/(2*a));
		}
		else if(t==0)
			printf("x1=x2=%.5lf\n",x1=-b/(2*a));
		else if(t<0){
			t=fabs(t);
			t1=-b/(2*a);
			t2=sqrt(t)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",t1,t2,t1,t2);
		}
	}
	return 0;
}
int main()
{
	int n,i;
	double a,b,c,d,e,s;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%lf%lf%lf",&a,&b,&c);
		d=b*b-4*a*c;

		e=(-1)*b/(2*a);
		if(d>0){
			s=sqrt(d)/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",e+s,e-s);
		}
		else if(d<0){
			s=sqrt((-1)*d)/(2*a);
			if(e==0)e=0-e;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",e,s,e,s);
		}
		    else{
			printf("x1=x2=%.5lf\n",e);
		}
	}
	return 0;
}
int main(void)
{
	int n;
	double a, b, c, delta, x1, x2, img, rl;
	cin >>n;
	for (int 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 << fixed << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else if (delta == 0)
		{
			x1 = (-b)/(2*a);
			cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
		}
		else
		{
			img = sqrt(-delta) / (2 * a);
			rl = (-b) / (2 * a);
			if (rl != 0)
			{
				cout << fixed << setprecision(5) << "x1=" << rl << "+" << img << "i;";
				cout << fixed << setprecision(5) << "x2=" << rl << "-" << img << "i" << endl;
			}
			else
			{
				cout << fixed << setprecision(5) << "x1=" << "0.00000" << "+" << img << "i;";
				cout << fixed << setprecision(5) << "x2=" << "0.00000" << "-" << img << "i" << endl;
			}
		}
	}
	return 0;
}
//********************************
//*????????????   **
//*?????? 1300012713 **
//*???2013.10.11  **
//********************************

int main() 
{
	int n; //????n
	cin >> n; //??n
	double a, b, c, x1, x2, d, e; //???????????
	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 << "x1=";//????
			printf("%.5f", x1);
			cout << ";x2=";
			printf("%.5f\n", x2);
		}
		if (b * b - 4 * a * c == 0 )//????????
		{
			x1 = (-b)/(2*a); //???
			cout << "x1=x2=";//????
			printf("%.5f\n", x1);
		}
		if (b * b - 4 * a * c < 0 )//????????
		{
			d = sqrt(4*a*c-b*b)/(2*a);
			e = (-b)/(2*a);
			if (e ==0)
				e=0;
			x1 = e + d * i;//????
			x2 = e - d * i;
			cout << "x1=";//????
			printf("%.5f", e);
			cout << "+";
			printf("%.5f", d);
			cout << "i;x2=";
			printf("%.5f", e);
			cout << "-";
			printf("%.5f", d);
			cout << "i" << endl;
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	double a,b,c,x1,x2,m,x;
	scanf("%d",&n);
	for(i=0;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);
			if(x1==x2)
				printf("x1=x2=%.5lf\n",x1);
			else
				printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else
		{
			m=sqrt(-b*b+4*a*c)/2.0/a;
			x=-b/2.0/a;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x,m,x,m);		
		}
	}
	return 0;
}
int main()
{
	int n,i;
	double a[30],b[30],c[30],x1,x2,m,q,p;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++)
	{
		if((b[i]*b[i]-4*a[i]*c[i])>0)
		{
			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]);
			printf("x1=%.5lf;",x1);
			printf("x2=%.5lf\n",x2);
		}
		else if((b[i]*b[i]-4*a[i]*c[i])==0)
		{
			x1=x2=(-b[i])/(2*a[i]);
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			m=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
			q=-(sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]));
			p=(-b[i])/(2*a[i]);
			if(a>0)
			{
			printf("x1=%.5lf+%.5lfi;",p,m);
			printf("x2=%.5lf%.5lfi\n",p,q);
			}
			else
			{
			printf("x1=%.5lf%.5lfi;",p,m);
			printf("x2=%.5lf+%.5lfi\n",p,q);
			}
		}
	}
	return 0;
}
main()
{
      int n,i;
      float a[1000],gen,pan,p,q;
      scanf("%d",&n);
      for(i=0;i<n;i++)
        {
              scanf("%f%f%f",&a[3*i],&a[3*i+1],&a[3*i+2]);
             
        }  
            for(i=0;i<n;i++)
      {
           pan=a[3*i+1]*a[3*i+1]-4*a[3*i]*a[3*i+2];
           if(fabs(pan)<=0.00001)
              printf("x1=x2=%.5f\n",-a[3*i+1]/(2*a[3*i]));
           gen=sqrt(fabs(pan));
           p=-a[3*i+1]/(2*a[3*i]),q=gen/(2*a[3*i]);
           if(fabs(p)<=0.000001)
                  p=0.00000;
           if(pan>0.00001)
              printf("x1=%.5f;x2=%.5f\n",p+q,p-q);
           if(pan<-0.00001)
              printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
      }
      //printf("%f%f%f",a[0],a[1],a[2]);
      
      
}
//********************************
//*????????????   **
//*?????? 1300012972 **
//*???2013.10.11  **
//********************************
int main()
{
	int n;

	// ??????a,b,c???????x1,x2??????D?????d,e??????
	double a, b, c, x1, x2, D, d, e;
	cin >> n;
	for (int k=1; k<=n; k++)
	{
		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 (fabs(x1) < 1e-4)
				x1=0;
			if (fabs(x2) < 1e-4)                         //????
				x2=0;                                  
			cout << fixed << setprecision(5) << "x1=" << x1
				 << ";" << "x2=" << x2 << endl;         // ???
		}
		else if (b * b - 4 * a * c == 0) // ?????????
		{
			x1=(-b) / (2 * a);
			if (fabs(x1)<1e-4)
				x1=0;
			cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl; //????
		}
		else
		{
			d=(-b) / (2 * a); // ?????
			e=sqrt(4 * a * c - b * b) / (2 * a); //?????
			if (fabs(d) < 1e-4)
				d=0;
			cout << fixed << setprecision(5) << "x1=" << d << "+" << e << "i"
				 << ";" << "x2=" << d << "-" << e << "i" << endl;
		}
	}
	return 0;
}
int  main()
{
  int i,n;
  float a,b,c;
  double x1,x2,d,e;
  scanf("%d",&n);
  for (i=1;i<=n;i++)
 {scanf("%f %f %f",&a,&b,&c);
 d=b*b-4*a*c;
if (b==0)
{if(d>0)
  {x1 = (sqrt(b*b-4*a*c))/(2*a);
   x2 = (- sqrt(b*b-4*a*c))/(2*a);      

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

    else 
    {e=sqrt(-d)/(-2*a);
    
  if(e>0)
    printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,e,b,e);
    else
     printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,-e,b,-e);
}
}
  }




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

	}
	
}
/**
????6
?  ?????
?  ??10.12
?  ???????????
*/


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

	cin >> n;                        // ??n

	for(int i=1 ; i<=n ; i++)        // ????
	{
		cin >> a >> b >> c;          // ??a,b,c
	    if(b * b - 4 * a * c < 0)    // ????????
		{   
			cout << fixed;
			// ????????????????i???

            if(b != 0)
			{
			 cout << "x1=" << setprecision(5) << -b/(2*a) << "+" ;
	     	 cout << setprecision(5) << sqrt(4 * a * c- b * b) / (2*a) << "i;";
             cout << "x2=" << setprecision(5) << -b/(2*a) << "-" ;
		     cout << setprecision(5) << sqrt(4 * a * c- b * b) / (2*a) << "i" << endl;
			}
			//???????????????????????
			if(b == 0)
			{
			 cout << "x1=" << setprecision(5) << b/(2*a) << "+" ;
	     	 cout << setprecision(5) << sqrt(4 * a * c- b * b) / (2*a) << "i;";
             cout << "x2=" << setprecision(5) << b/(2*a) << "-" ;
		     cout << setprecision(5) << sqrt(4 * a * c- b * b) / (2*a) << "i" << endl;
			}
		}
	     if (b * b - 4 * a * c == 0)
		{	x1 = -b / (2 * a);

		    cout << fixed;
			// ?????0??x1,x2??
		    cout << "x1=x2=" << setprecision(5) <<x1 << endl;
		}

	     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;
			// ????????????x1,x2
            cout << "x1=" << setprecision(5) << x1 << ";" ;
			cout << "x2=" << setprecision(5) << x2 << endl;
		}
	}
	return 0;
}