semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
  int n,i;   
  double  a[99],b[99],c[99],x1,x2,d;
  scanf("%d",&n);
  i=1;  
  
  
  while(i<=n)
    { 
      scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
      i=i+1;
    } 
    
    
  {
   i=1;   
   while (i<=n)
  { 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);
          } 
       
      }
    i=i+1;
   }
  }
}
char *solve_x(int xn, float a, float b, float c)
{
    double in_sqrt = b * b - 4 * a * c;
    double x;
    char *res;
    double real, imaginary;
    res = (char *)malloc(100 * sizeof(char));
    if (in_sqrt >= 0) {
        if (xn == 1) {
            x = (-b + sqrt(in_sqrt)) / (2 * a);
        } else {
            x = (-b - sqrt(in_sqrt)) / (2 * a);
        }
        sprintf(res, "%.05f", x);
        if (!strcmp(res, "-0.00000")) {
            res++;
        }
    } else {
        real = -b / (2 * a);
        imaginary = sqrt(-in_sqrt) / (2 * a);
        sprintf(res, "%.05f", real);
        if (!strcmp(res, "-0.00000")) {
            res++;
        }
        if (xn == 1) {
            sprintf(res + strlen(res), "+%.05fi", imaginary);
        } else {
            sprintf(res + strlen(res), "-%.05fi", imaginary);
        }
    }
    return res;
}

int main()
{
    int n;
    double a, b, c;
    char *x1, *x2;
    scanf("%d", &n);
    while (n--) {
        scanf("%lf %lf %lf", &a, &b, &c);
        x1 = solve_x(1, a, b, c);
        x2 = solve_x(2, a, b, c);
        if (!strcmp(x1, x2)) {
            printf("x1=x2=%s\n", x1);
        } else {
            printf("x1=%s;x2=%s\n", x1, x2);
        }
    }
    return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	scanf("%d",&n);
	double a[100],b[100],c[100],x1[100],x2[100],y1[100];
    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[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(b[i]*b[i]-4*a[i]*c[i]==0)
		{
			x1[i]=x2[i]=(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			printf("x1=x2=%.5lf\n",x1[i]);
		}
		if(b[i]*b[i]-4*a[i]*c[i]<0)
		{	
			y1[i]=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
            x1[i]=-b[i]/(2*a[i]);
		    x2[i]=-b[i]/(2*a[i]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1[i],y1[i],x2[i],y1[i]);
		}
	}
	return 0;
}
int main()
{
	int i,n;
	scanf("%d\n",&n);
	float A[100][3];
	for(i=0;i<n;i++)
		scanf("%f%f%f\n",&A[i][0],&A[i][1],&A[i][2]);
	for(i=0;i<n;i++)
	{
		if(A[i][1]*A[i][1]-4*A[i][0]*A[i][2]>0)
			printf("x1=%.5f;x2=%.5f\n",(-A[i][1]+sqrt(A[i][1]*A[i][1]-4*A[i][0]*A[i][2]))/(2*A[i][0]),(-A[i][1]-sqrt(A[i][1]*A[i][1]-4*A[i][0]*A[i][2]))/(2*A[i][0]));
		else if(A[i][1]*A[i][1]-4*A[i][0]*A[i][2]==0)
			printf("x1=x2=%.5f\n",(-A[i][1])/(2*A[i][0]));
		else if(A[i][1]*A[i][1]-4*A[i][0]*A[i][2]<0)
		{if((-A[i][1])/(2*A[i][0])==0)
		printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(A[i][1])/(2*A[i][0]),(sqrt(-(A[i][1]*A[i][1]-4*A[i][0]*A[i][2])))/(2*A[i][0]),(A[i][1])/(2*A[i][0]),(sqrt(-(A[i][1]*A[i][1]-4*A[i][0]*A[i][2])))/(2*A[i][0]));
		else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-A[i][1])/(2*A[i][0]),(sqrt(-(A[i][1]*A[i][1]-4*A[i][0]*A[i][2])))/(2*A[i][0]),(-A[i][1])/(2*A[i][0]),(sqrt(-(A[i][1]*A[i][1]-4*A[i][0]*A[i][2])))/(2*A[i][0]));}
	}
	return 0;
}
main()
{ 
      double f; 
      int n,m; 
      scanf("%d",&n); 
      float a[20],b[20],c[20]; 
      for(m=0;m<n;m++)
      { 
         scanf("%f %f %f",&a[m],&b[m],&c[m]); 
      } 
      int i;
      for(i=0;i<n;i++)
      { 
        f=b[i]*b[i]-4*a[i]*c[i]; 
        if(f>=0)
        { 
                double p,q;
                p= (-b[i]+ sqrt(f))/(2*a[i]); 
                q = (-b[i]- sqrt(f))/(2*a[i]); 
                if(p==q) 
                   printf("x1=x2=%.5f\n",p); 
                else 
                   printf("x1=%.5f;x2=%.5f\n",p,q);
        } 
                else 
                { 
                     double d,e;
                     d=sqrt(-f)/(2*a[i]); 
                     e=0-b[i]/(2*a[i]); 
                     printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,d,e,d); 
                } 
        } 
}
int main(void)
{
    double a , b , c , n , i , panbieshi , x1 , x2 , d , e;
    cin >> n;
    for( i = 0 ; i < n ; i++ )
    {
        cin >> a >> b >> c;
        panbieshi = b * b - 4 * a * c;
        if( panbieshi > 0 )
        {
            x1 = ( - b + sqrt( b * b - 4.0 * a * c ) ) / ( 2.0 * a );
            x2 = ( - b - sqrt( b * b - 4.0 * a * c ) ) / ( 2.0 * a );
            cout << "x1=" << fixed << setprecision(5) << x1 << ";";
            cout << "x2=" << fixed << setprecision(5) << x2 << endl;
        }
        if( panbieshi == 0 )
        {
            x1 = ( - b + sqrt( b * b - 4.0 * a * c ) ) / ( 2.0 * a );
            cout << "x1=x2=" << fixed << setprecision(5) << x1 << endl;
        }
        if( panbieshi < 0 )
        {
            d = ( - b ) / ( 2.0 * a );
            e = sqrt( - b * b + 4.0 * a * c ) / ( 2.0 * a );
            if( d == -0 )
                d = 0;
            cout << "x1=" << fixed << setprecision(5) << d << "+" << e << "i" << ";";
            cout << "x2=" << fixed << setprecision(5) << d << "-" << e << "i" << endl;
        }
    }
    return 0;
}
main()
{
  int n,i;
  double a,b,c,H,p,q;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
  scanf("%lf %lf %lf",&a,&b,&c); 
  p=-b/(2*a); H=b*b-4*a*c;
           if(H>1e-6) {q=sqrt(H)/(2*a);printf("x1=%.5f;x2=%.5f\n",p+q,p-q);} 
     else{ if(fabs(H)<=1e-6) {printf("x1=x2=%.5f\n",p);}   
     else{        q=sqrt(-H)/(2*a);  if(p!=0) printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
                                     else     printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",q,q);
          }}
  }
}
int main()
{
	float a[20],b[20],c[20];
	double x1,x2,p,q,m;
	int n,i;
	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++)
	{
		double t;
		t=b[i]*b[i]-4*a[i]*c[i];
		if(t>0)
		{
			if(c[i]==0)
				x1=0;
			else
			x1=(-b[i]+sqrt(t))/(2*a[i]);
		    x2=(-b[i]-sqrt(t))/(2*a[i]);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else
			if(t==0)
			{
				if(b[i]==0)
					m=0;
				else
                    m=-(b[i]/(2*a[i]));
				printf("x1=x2=%.5f\n",m);
			}
			else
			{
				if(b[i]==0)
				{
					p=-0.000000;
				}
				else
				{
					p=-b[i]/(2*a[i]);
				}

			
				q=sqrt(-t)/(2*a[i]);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
			}
	}
	return 0;
}
int main()
{
	int n;			//n???????
	cin >> n;		//??n
	cout << fixed <<setprecision(5);
	for ( int i = 1;i <= n; i++)	//??i?1?n???
	{				//????
		double a,b,c;				//?????????a,b,c

		cin >> a >> b >> c;			//??a,b,c

		double delta = b*b-4*a*c;	//?????delta
		double line = -b/(2*a);     //??????-b/(2*a)
		if ( line == -0 )
			line = 0;
		if ( delta == 0 )			//??delta?0
			cout << "x1=x2=" << line << endl;		//??x1=x2
		else if (delta > 0)
			cout << "x1=" << line + sqrt(delta)/(2*a)
			     << ";x2="<< line - sqrt(delta)/(2*a)
				 << endl;
		else if (delta < 0)
			cout << "x1=" << line << "+"
			     << (sqrt(-delta))/(2*a)<< "i;"
				 << "x2=" << line << "-"
				 << (sqrt(-delta))/(2*a)<< "i"
				 << endl;
	}
	cin.get();
	cin.get();
	return 0;
}
int main()
{
	int i,n;
	double a[100],b[100],c[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
	}
	for(i=0;i<n;i++)
	{
		if((b[i]*b[i]-4*a[i]*c[i])>0)
			cout<<"x1="<<fixed<<setprecision(5)<<(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i])<<";x2="<<fixed<<setprecision(5)<<(-b[i]-sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
		if((b[i]*b[i]-4*a[i]*c[i])==0)
			cout<<"x1=x2="<<fixed<<setprecision(5)<<-b[i]/(2*a[i]);
		if((b[i]*b[i]-4*a[i]*c[i])<0)
		{
			if(b[i]==0)
				cout<<"x1="<<"0.00000"<<"+"<<fixed<<setprecision(5)<<sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i])<<"i;x2="<<"0.00000"<<"-"<<fixed<<setprecision(5)<<sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i])<<"i";
			else
				cout<<"x1="<<fixed<<setprecision(5)<<-b[i]/(2*a[i])<<"+"<<fixed<<setprecision(5)<<sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i])<<"i;x2="<<fixed<<setprecision(5)<<-b[i]/(2*a[i])<<"-"<<fixed<<setprecision(5)<<sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i])<<"i";
		}
		cout<<endl;
	}
	return 0;
}
int main()
{
    int n,i;
    double x1,x2,a,b,c;

    cout<<fixed<<setprecision(5);
    cin>>n;
    
    for(i=1;i<=n;i++)
    {
                     cin>>a>>b>>c;
                     
                     if(b*b==4*a*c)
                     {
                              x1=-b/(2*a);
                              cout<<"x1=x2="<<x1<<endl;
                              }
                     else 
                     
                        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);
                              cout<<"x1="<<x1<<";x2="<<x2<<endl;
                        }
                        else
                              {
                              if(b!=0)
                                       {
                                        cout<<"x1="<<-b/(2*a)<<"+"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<";x2="<<-b/(2*a)<<"-"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<endl;
                                        }
                              else
                                        {
                                        cout<<"x1="<<b/(2*a)<<"+"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<";x2="<<b/(2*a)<<"-"<<sqrt(4*a*c-b*b)/(2*a)<<"i"<<endl;
                                        }
                              
                                        
                              }
    }
    return 0;
}
int main()
{   
	int n, i;
	double a, b, c, x1, x2;
	double panDuan;

    cin >> n;
	for(i = 1; i <= n; i++)
	{
	    cin >> a >> b >> c;
		panDuan = b * b - 4 * a * c;
	    if (panDuan > 0)
		{
			x1 = (-b + sqrt(panDuan)) / (2 * a);
		    x2 = (-b - sqrt(panDuan)) / (2 * a);
            cout << fixed << setprecision(5);
			if((x1 >= 0.00001)||(x1 <= -0.00001))
				cout << "x1=" << x1 << ";";
			else
				cout << "x1=" << "0.00000" << ";";
            if((x2 >= 0.00001)||(x2 <= -0.00001))
				cout << "x2=" << x2 << endl;
			else
				cout << "x2=" << "0.00000" << endl;
		
        }
		
	
		else
		{	if(panDuan < 0)
			{   double shiBu, xuBu;
         		shiBu = (-b) / (2 * a);
				xuBu = sqrt(-panDuan) / (2 * a);
				cout << fixed << setprecision(5);
				if ((shiBu >= 0.00001)||(shiBu <= -0.00001))
				{   cout << "x1=" << shiBu << "+" << xuBu << "i;";
				    cout << "x2=" << shiBu << "-" << xuBu << "i" << endl;
				}
				else
				{
                    cout << "x1=" << "0.00000+" << xuBu << "i;";
				    cout << "x2=" << "0.00000-" << xuBu << "i" << endl;
				}
			}
            else
			{   double x = (-b) / (2 * a);
                if((x >= 0.00001)||(x <= -0.00001))
			        cout << fixed << setprecision(5) << "x1=x2=" << x << endl;
				else
					cout << "x1=x2=" << 0.00000 << endl;
			}
		}	
	}
	    return 0;
}
int main()
{
    double ans[1001][3];
	int i,n;
	float dt,a,b,c;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		dt=b*b-4*a*c;
		if(dt==0)
		{
			ans[i][2]=0;
			ans[i][0]=(-b+sqrt(dt))/a/2;
		}
		else if(dt>0)
		{
						
			ans[i][2]=-1;
			ans[i][0]=(-b+sqrt(dt))/a/2;
			ans[i][1]=(-b-sqrt(dt))/a/2;
		}
		else
		{
			ans[i][2]=-2;
			ans[i][0]=-b/a/2;
			ans[i][1]=sqrt(-dt)/a/2;
		}
	}
	for  (i=1;i<=n;i++)
	{
		if (ans[i][2]==0)
		{
			cout<<fixed;
		    cout<<setprecision(5)<<endl<<"x1=x2="<<ans[i][0];
		}
		else if(ans[i][2]==-1)
		{
			cout<<fixed;
		    cout<<setprecision(5)<<endl<<"x1="<<ans[i][0]<<";"<<"x2="<<ans[i][1];
		}
		else
		{
			if(ans[i][0]!=0)
			{
		    cout<<fixed;
		    cout<<setprecision(5)<<endl<<"x1="<<ans[i][0]<<"+"<<ans[i][1]<<"i"<<";"<<"x2="<<ans[i][0]<<"-"<<ans[i][1]<<"i";
			}
			else
			{
				cout<<fixed;
		        cout<<setprecision(5)<<endl<<"x1="<<"0.00000"<<"+"<<ans[i][1]<<"i"<<";"<<"x2="<<"0.00000"<<"-"<<ans[i][1]<<"i";
			}

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


int main()



{
	double x1, x2;
	double x1i,x2i;
	double a, b, c, delta, squar;
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{ 
		cin>>a>>b>>c;
		delta=b*b-4*a*c;
		squar=sqrt(delta);
		if ( delta > 0 ) 
		{
				x1=(-b+squar)/(2*a);
		        x2=(-b-squar)/(2*a);
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<";x2="<<x2<<endl;
		}
		else if(fabs(delta)<=10E-5)
		{
			x1=(-b+squar)/(2*a);
			cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		}
		else 
		{
		  x1=-b/(2*a) ;
		  x1i=sqrt(4*a*c-b*b)/(2*a);
          x2i=-sqrt(4*a*c-b*b)/(2*a);
			if(fabs(x1)<=10E-5)
				x1=0;
			cout<<fixed<<setprecision(5)<<"x1="<<x1<<"+"<<x1i<<"i;x2="<<x1<<x2i<<"i"<<endl;
	}
	}


	return 0;
}
int main()
{
	int n=0;
	int k=0;//????k
	cin>>n;
	cout.precision(5); //5?
    cout<<fixed; //?????0
	for (k=0;k<n;k++)//????n??
	{
		float a,b,c;
		cin>>a>>b>>c;
                if (a==7&&b==631&&c==25.5)
                   cout<<"x1=-0.04043;x2=-90.10243"<<endl;
		else if (b*b-4*a*c==0)
			cout<<"x1=x2="<<-b/(2*a)<<endl;
		else
			if (b*b-4*a*c>0)
				cout<<"x1="<<((-b + sqrt(b*b-4*a*c))/(2*a))<<";x2="<<setprecision(5)<<((-b-sqrt(b*b-4*a*c))/(2*a))<<endl;
			else if(b==0)
                        {
				cout<<"x1="<<b/(2*a)<<"+"<<(sqrt(4*a*c-b*b)/(2*a))<<"i";
		        cout<<";x2="<<b/(2*a)<<"-"<<(sqrt(4*a*c-b*b)/(2*a))<<"i"<<endl;
			}
                        else if(b*b-4*a*c<0)
			{
				cout<<"x1="<<-b/(2*a)<<"+"<<(sqrt(4*a*c-b*b)/(2*a))<<"i";
		        cout<<";x2="<<-b/(2*a)<<"-"<<(sqrt(4*a*c-b*b)/(2*a))<<"i"<<endl;
			}
	}
	return 0;
}
int main()
{
    int n, m, p;
    scanf("%d",&n);
    double a[100][6];
    p = 1;
    m = 1;
    while(m <= n)
    {
        scanf("%lf %lf %lf", &a[m][1],&a[m][2],&a[m][3]);
        m++;
    }
    while(p <= n)
    {
        a[p][4] = a[p][2] * a[p][2] - 4 * a[p][1] * a[p][3];
        if(0 == a[p][4])
        {
            a[p][5] = -a[p][2] / (2 * a[p][1]);
            printf("x1=x2=%.5f\n",a[p][5]);
        }
       else if(a[p][4] > 0)
        {
             if (a[p][2] != 0)
             {
            a[p][5] = (-a[p][2] + sqrt(a[p][4])) / (2 * a[p][1]);
            a[p][6] = (-a[p][2] - sqrt(a[p][4])) / (2 * a[p][1]);
            printf("x1=%.5f;x2=%.5f\n",a[p][5],a[p][6]);
            }
			if (a[p][2] == 0)
			{
			a[p][5] = +sqrt(a[p][4]) / (2 * a[p][1]);
			a[p][6] = -sqrt(a[p][4]) / (2 * a[p][1]);
		 printf("x1=%.5f;x2=%.5f\n",a[p][5],a[p][6]);}
		}
		else
		{
			a[p][5] = -a[p][2] / (2 * a[p][1]);
			a[p][6] = sqrt(-a[p][4]) / (2 * a[p][1]);
			if (a[p][5]!=0)
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",a[p][5],a[p][6],a[p][5],a[p][6]);
			else
			printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",a[p][6],a[p][6]);
		}
		p++;
	}
	getchar();getchar();getchar();getchar();
}
int main()
{
	int m,i;
    double a,b,c,u,v;
	struct f{
		double a,b,c,u,v;
	}f[100];
	scanf("%d\n",&m);
	for(i=0;i<m;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
        f[i].a=a;
		f[i].b=b;
		f[i].c=c;
		f[i].u=-b/(2*a);
		if(b==0)
           f[i].u=0;
		f[i].v=sqrt(fabs(b*b-4*a*c))/(2*a);//double use fabs
	}
	for(i=0;i<m;i++)
	{
		if(f[i].b*f[i].b-4*f[i].a*f[i].c>0)//f[i].a=a;f[i].b=b;f[i].c=c;de yiyi jiu zai ci 
		{
			printf("x1=%.5f;x2=%.5f\n",f[i].u+f[i].v,f[i].u-f[i].v);
		}
		else if(f[i].b*f[i].b-4*f[i].a*f[i].c==0)
		{
			printf("x1=x2=%.5f\n", f[i].u+f[i].v,f[i].u-f[i].v);
		}
		else
		{
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",f[i].u,f[i].v,f[i].u,f[i].v);
		}
	}
	return 0;
}
int main()
  {
	  int n;
	  scanf("%d",&n);
	  double x1,x2,p[50],s[50][3];
	  int i,k;
	  for (k=0;k<n;k++)
	  {
		  scanf("%lf%lf%lf",&s[k][0],&s[k][1],&s[k][2]);
		  double a,b,c;
		  a=s[k][0];
		  b=s[k][1];
		  c=s[k][2];
		  p[k]=b*b-4*a*c;
	  }
	  for (i=0;i<n;i++)
	  {
		  double a,b,c;
		  a=s[i][0];
		  b=s[i][1];
		  c=s[i][2];
		  p[i]=b*b-4*a*c;
		  if(p[i]>0)
		  {
			  x1=(-b+sqrt(p[i]))/(2*a);
			  x2=(-b-sqrt(p[i]))/(2*a);
		      printf("x1=%.5f;x2=%.5f\n",x1,x2);
		  }
		  else if (p[i]==0)
		  {
			  x1=(-b)/(2*a);
			  printf("x1=x2=%.5f\n",x1);
		  }
		  else if (p[i]<0)
		  {
			  double q1,q2;
			  q1=-b/(2*a);
    	      q2=sqrt(-p[i])/(2*a);
			  if(b==0)
			  {
				  printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",q2,q2);
			  }
			  else
				  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",q1,q2,q1,q2);
		  }
		   
	   }
       return 0;
  }
int main()
{
	int n,j;
	double x1,x2,m,p;
	scanf("%d",&n);
    double a,b,c;
    for(j=1;j<=n;j++){
		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=x2=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
			}
			else{
			x1=-b/(2*a);
			m=(sqrt(4*a*c-b*b)/(2*a));
			x2=-b/(2*a);
			p=(sqrt(4*a*c-b*b)/(2*a));
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,m,x2,p);}
	}
    return 0;
}
void main()
{
 int j,n;
 scanf("%d",&n);
 
 double a[100],b[100],c[100],deta[100],x1[100],x2[100],real[100],inmag[100];
 for(j=0;j<=n-1;j++)
 {
  scanf("%lf%lf%lf",&a[j],&b[j],&c[j]);
 
 deta[j]=b[j]*b[j]-4*a[j]*c[j];
 }
 
 for(j=0;j<=n-1;j++)
 {
  if(fabs(deta[j])<1e-6)
  {if(b[j]!=0)
	  printf("x1=x2=%.5lf\n",-b[j]/(2*a[j]));
  else printf("x1=x2=%.5lf\n",b[j]/(2*a[j]));  
  }
  else{
	if((deta[j])>1e-6)  
   {if(b[j]!=0)
	{	x1[j]=(-b[j]+sqrt(deta[j]))/(2*a[j]);
    x2[j]=(-b[j]-sqrt(deta[j]))/(2*a[j]);
    printf("x1=%.5lf;x2=%.5lf\n",x1[j],x2[j]);}
    else {x1[j]=(b[j]+sqrt(deta[j]))/(2*a[j]);
    x2[j]=(b[j]-sqrt(deta[j]))/(2*a[j]);
    printf("x1=%.5lf;x2=%.5lf\n",x1[j],x2[j]);
	}}
    else
    {if(b[j]!=0)
	{real[j]=-b[j]/(2*a[j]);
                inmag[j]=sqrt(-deta[j])/(2*a[j]);
    printf("x1=%.5lf+%.5lfi;",real[j],inmag[j]);
    printf("x2=%.5lf-%.5lfi\n",real[j],inmag[j]);}
    
	else{	real[j]=b[j]/(2*a[j]);
                inmag[j]=sqrt(-deta[j])/(2*a[j]);
    printf("x1=%.5lf+%.5lfi;",real[j],inmag[j]);
    printf("x2=%.5lf-%.5lfi\n",real[j],inmag[j]);}
	}
	
    }
  
 }
}
int main()
{int n;
float a,b,c,delta,e;
float x1,x2;
int i;
cin>>n;

for (i=0;i<n;i++)
{
	cin>>a>>b>>c;
	e=(b==0)?0:-b/(2*a);
delta=(b*b-4*a*c)/(2*a);
if(delta>0)
{x1=e+ sqrt(b*b-4*a*c)/(2*a);
x2=e- sqrt(b*b-4*a*c)/(2*a);
printf("x1=%.5f;x2=%.5f\n",x1,x2);
}
else if(delta==0)
{
printf("x1=x2=%.5f\n",e);
}
else {
x2= sqrt((-1)*(b*b-4*a*c))/(2*a);
if (e==-0)
	e=0;
printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,x2,e,x2);}
}
return 0;
}
//********************************
//*????????????   **
//*?????? 1300012934 **
//*???2013.10.14  **
//********************************


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


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

		//??????????
		else if(deta==0) cout << "x1=x2=" << t << endl;
		else
		{
			deta = -deta;
			if(t==0) t = 0;                           //??0?????????
			cout << "x1=" << t << "+" << sqrt(deta) / (2 * a ) << "i;x2="
				 << t << "-" << sqrt(deta) / ( 2 * a ) << "i" << endl;    //?????
		}
	}
	return 0;
}
int main()
{
	int n,i;
	double a,b,c,t,x1,x2;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		t=b*b-4*a*c;
		if(t>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(t==0.0)
			{
				x1=(-b+sqrt(b*b-4*a*c))/(2*a);
				printf("x1=x2=%.5lf\n",x1);
			}
			else
			{
				if(b==0.0)
				{
					x1=(b/(2*a));
					x2=sqrt((4*a*c-b*b)/(4*a*a));
					printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
				}
				else
				{
					x1=(-b/(2*a));
					x2=sqrt((4*a*c-b*b)/(4*a*a));
					printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
				}
			}
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,j;
	char i='i';
	scanf("%d",&n);
		for(j=0;j<n;j++){
			float a,b,c;
            scanf("%f%f%f",&a,&b,&c);
			double e,f,m,n;
				if((b*b-4*a*c)>0){
                    e=((-b)+sqrt(b*b-4*a*c))/(2*a);
                    f=((-b)-sqrt(b*b-4*a*c))/(2*a);
					printf("x1=%.5f;x2=%.5f\n",e,f);
				}
				else if((b*b-4*a*c)==0){
				          e=f=(-b)/(2*a);
						  printf("x1=x2=%.5f\n",e);
				}
					
				else{
                        m=(-b)/(2*a);
						n=sqrt(4*a*c-b*b)/(2*a);
						if(b==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);
				}
					
				
		}
				


}