semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
	 double a,b,c;
	 scanf("%lf%lf%lf",&a,&b,&c);
	 if(b*b>4*a*c)
		 printf("x1=%.5lf;x2=%.5lf\n",(-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a));
	 else if(b*b==4*a*c)
		 printf("x1=x2=%.5lf\n",(-b+sqrt(b*b-4*a*c))/(2*a));
	 else
	 {
		 if(b==0)
            printf("x1=0.00000+%.5lfi;x2=0.00000%.5lfi\n",sqrt(-b*b+4*a*c)/(2*a),-sqrt(-b*b+4*a*c)/(2*a));
		else
		 printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\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;
}
int main()
{
	int n;
	cin >> n;
	float formal[n][3];
	for (int i = 0; i < n; i++)
		cin >> formal[i][0] >> formal[i][1] >> formal[i][2];
	double x1,x2,delta,unfi;
	for (int i = 0; i < n; i++)
	{
		delta = formal[i][1] * formal[i][1] - (4 * formal[i][0] * formal[i][2]);
		if (delta > 0)
		{
			x1 = (-formal[i][1] + sqrt(delta)) / (2 * formal[i][0]);
			x2 = (-formal[i][1] - sqrt(delta)) / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			else if (x2== -0)
				x2 = 0;
			cout<<fixed;
			cout << "x1=" << setprecision(5) << x1 << ";x2=" << x2 << endl;
		}
		else if (delta == 0)
		{
			x1 = -formal[i][1] / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			cout<<fixed;
			cout << "x1=x2=" << setprecision(5) << x1<<endl;
		}
		else
		{
			unfi = abs(sqrt(-delta) / (2 * formal[i][0]));
			x1 = -formal[i][1] / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			cout << fixed;
			cout << setprecision(5) << "x1=" << x1 << "+" << unfi << "i;x2="
			<< x1 << "-" << unfi << "i" <<endl;
		}
	}
	return 0;
}
int main()
{
	int n,i;
	double a,b,c,d,x1,x2,e,f;
	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)
		{
			x1=(sqrt(d)-b)/(2*a);
			x2=(-sqrt(d)-b)/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		if(d==0)
		{
			x1=-b/(2*a);
			x2=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		if(d<0)
		{
			e=sqrt(-d)/(2*a);
			f=-b/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",f,e,f,e);
		}
	}
	return 0;
}
int main()
{
	double a,b,c,w,x1,x2;
	int n,i;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
	
		scanf("%lf%lf%lf",&a,&b,&c);
	    w=b*b-4*a*c;
		if (w>0)
		{
			w=sqrt(w);
		    x1=(0-b+w)/(2*a);
		    x2=(0-b-w)/(2*a);
		    printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(w<0)
		{
			w=sqrt(0-w)/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",(-b)/(2*a),w,(-b)/(2*a),w);
		}
		else if(w==0)
		{
			x1=x2=(0-b)/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
	}


	return 0;
}
main()
{
	int n,i;
	double a,b,c,root1,root2,shi,xu,t;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);                               
		t=b*b-4*a*c;
		if(t>0)
		{
			if(b==0)
				printf("x1=0.00000+%.5f;x2=0.00000+%.5f\n",sqrt(t)/(2*a),-sqrt(t)/(2*a));
			else
			    root1=(-b + sqrt(t))/(2*a);
		        root2=(-b - sqrt(t))/(2*a);
			    printf("x1=%.5f;x2=%.5f\n",root1,root2);
		}
		else
		{
			if(t<0)                                            
				{
				shi=-b/(2*a);
				xu=sqrt(-t)/(2*a);
				if(shi==0)
					printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",xu,xu);
				else
				{

					if(xu>0)
						printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",shi,xu,shi,xu);
					else
						printf("x1=%.5f-%.5fi;x2=%.5f+%.5fi\n",shi,-xu,shi,-xu);
				}
				}
			else
			{
				if(b==0)
					printf("x1=x2=0");
				else
				    root1=-b/(2*a);
				    printf("x1=x2=%.5f\n",root1);
			}
		}
	}
return 0;
}
main()
{
      int n,i;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
                      double a,b,c,m;
                      scanf("%lf %lf %lf",&a,&b,&c);
                      m=b*b-4*a*c;
      if(fabs(m)<=1e-6)
           {
                       if(fabs(b)<=1e-6)
                                printf("x1=x2=%.5f",b/(2*a));
                       else
                                printf("x1=x2=%.5f",-b/(2*a));
           }
      else 
           if(m>1e-6)
              printf("x1=%.5lf;x2=%.5lf",(-b+sqrt(m))/(2*a),(-b-sqrt(m))/(2*a));
           else
                 {
                           if(fabs(b)<=1e-6)
                                printf("x1=%.5lf+%.5lfi;x2=%.5f-%.5fi",b/(2*a),sqrt(-m)/(2*a),b/(2*a),sqrt(-m)/(2*a));
                           else
                                printf("x1=%.5lf+%.5lfi;x2=%.5f-%.5fi",-b/(2*a),sqrt(-m)/(2*a),-b/(2*a),sqrt(-m)/(2*a));
                 }
      printf("\n");
      }
}
int main(int argc, char* argv[])

{
     int n,i;
     double a[1000],b[1000],c[1000];
     double x1,x2,d,e;
     scanf("%d",&n);
     for(i=0;i<n;i++){
        scanf("%lf %lf %lf",&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]);

        printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
        }
        else if((b[i]*b[i]-4*a[i]*c[i])==0){
        x1=-b[i]/(2*a[i]);
        printf("x1=x2=%.5lf\n",x1);
        }
        else{
        d=-b[i]/(2*a[i]);
        e=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
        if(d==0){printf("x1=-0.00000+%.5lfi;x2=-0.00000-%.5lfi\n",e,e);}
        else{printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",d,e,d,e);}
        }
     }	
        return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	while(n--)
	{
       double a,b,c;
	   scanf("%lf %lf %lf",&a,&b,&c);
	   double x1,x2,i;
	   if(b*b-4*a*c>0)
	   {
	      x1 = (-b + sqrt(b*b-4*a*c))/(2.0*a); 
          x2 = (-b - sqrt(b*b-4*a*c))/(2.0*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.0*a); 
           x2 = (-b - sqrt(b*b-4*a*c))/(2.0*a);
		   printf("x1=x2=%.5lf\n",x1,x2);
	   }
	   else  {
		         double m;
		         m= sqrt(-(b*b-4*a*c))/(2.0*a); 
                 x1=(-b)/(2.0*a);
				 printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,m,x1,m);
	   }
    }
	return 0;
}
int main()
{
 int n,i;
 double a,b,c,dt,p,q;
 scanf("%d",&n);
 for(i=1;i<=n;i++)
 {
  scanf("%lf%lf%lf",&a,&b,&c);
  dt=b*b-4*a*c;
  if(dt==0)
  {
   p=-b/2/a;if(p==0)p=0;
   printf("x1=x2=%.5lf\n",p);
  }
  else if(dt>0)
  {
   p=(-b+sqrt(dt))/2/a;q=(-b-sqrt(dt))/2/a;
   printf("x1=%.5lf;x2=%.5lf\n",p,q);
  }
  else
  {
   p=-b/2/a;q=sqrt(-dt)/2/a;if(p==0)p=0;
   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
  }
 }
 return 0;
}
void main()
{
	double a[32768],b[32768],c[32768];
	int n,i;
	double d,x1,x2,e;
    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 (fabs(a[i])<1e-15)
			printf("Wrong\n");
		else 
		{
			d=b[i]*b[i]-4*a[i]*c[i];
			if (fabs(d)<1e-15)
			{
			         x1=-b[i]/(2*a[i]);
			         x2=-b[i]/(2*a[i]);
					 if (fabs(x1)<5e-6) x1=0;
				     if (fabs(x2)<5e-6) x2=0;
			         printf("x1=x2=%.5f\n",x1);
			}
			else if (d>=1e-15)
			{
				x1=(-b[i]+sqrt(d))/(2*a[i]);
				x2=(-b[i]-sqrt(d))/(2*a[i]);
				if (fabs(x1)<5e-6) x1=0;
				if (fabs(x2)<5e-6) x2=0;
				if(fabs(("%.5f",x1)-("%.5f",x2))<5e-6)
					printf("x1=x2=%.5f\n",x1); 
				else printf("x1=%.5f;x2=%.5f\n",x1,x2);
			}
			else
			{
				x1=-b[i]/(2*a[i]);
			    x2=-b[i]/(2*a[i]);
				if (fabs(x1)<5e-6) x1=0;
				if (fabs(x2)<5e-6) x2=0;
				e=sqrt(-d)/(2*a[i]);
				if (fabs(e)<5e-6) printf("x1=x2=%.5f\n",x1);
				else
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,e,x2,e);
			}
		}
	}
}
int main()
{float a,b,c,delta;
int n,i;
cin>>n;
for(i=1;i<=n;i++)
{cin>>a>>b>>c;
delta=b*b-4*a*c;
if(b!=0)
{
if(delta>0)
{cout<<"x1=";
printf("%.5f", (-b + sqrt(b*b-4*a*c))/(2*a));
cout<<";x2=";
printf("%.5f", (-b - sqrt(b*b-4*a*c))/(2*a));
cout<<endl;
}
if(delta==0)
{cout<<"x1=x2=";
printf("%.5f", (-b - sqrt(b*b-4*a*c))/(2*a));
cout<<endl;
}
if(delta<0)
{delta=-delta;
cout<<"x1=";
printf("%.5f", (-b)/(2*a));
cout<<"+";
printf("%.5f", sqrt(delta)/(2*a));
cout<<"i;x2=";
printf("%.5f", (-b)/(2*a));
cout<<"-";
printf("%.5f", sqrt(delta)/(2*a));
cout<<"i"<<endl;

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

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

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

}
int main()
{
	int n,i;
	double a,b,c,x,y;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		if(b*b-4*a*c>0)
		{
			x=(-b+sqrt(b*b-4*a*c))/(2*a);
			y=(-b-sqrt(b*b-4*a*c))/(2*a);
			cout<<"x1=";
			printf("%.5lf",x);
			cout<<";x2=";
			printf("%.5lf\n",y);
		}
		else if(b*b-4*a*c==0)
		{
			x=(-b+sqrt(b*b-4*a*c))/(2*a);
			cout<<"x1=x2=";
			printf("%.5lf\n",x);
		}
		else
		{
			x=(sqrt(-b*b+4*a*c))/(2*a);
			if(b!=0)
				y=(-b)/(2*a);
			else y=0;
			cout<<"x1=";
			printf("%.5lf",y);
			cout<<"+";
			printf("%.5lf",x);
			cout<<"i;x2=";
			printf("%.5lf",y);
			cout<<"-";
			printf("%.5lf",x);
			cout<<"i"<<endl;
		}
	}
	return 0;
}
int main(){
	int n;cin >> n;
	double a,b,c,x1,x2;
	while(n--){
		cin >> a >> b >> c;
		if((b*b-4*a*c)>0){
			x1 = (-b)/(2*a);
			x2 = (sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1+x2,x1-x2);
		}else if((b*b-4*a*c)<0){
			x1 = (0-b)/(2*a);
			//if(x1 == 0) x1 = 0;
			x2 = (sqrt(4*a*c-b*b))/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);
		} else{
			printf("x1=x2=%.5f\n",(-b)/(2*a));
		}
	}
	return 0;
}
double a,b,c;
double x1,x2,p,q;
int n;
int main()
{
    
    cin >> n;
    while(n--)
    {
        cin >> a >> b >> c;
       if((b*b-4*a*c)>0)
       {
        x1 = (0-b+sqrt(b*b-4*a*c))/(a*2);
        x2 = (0-b-sqrt(b*b-4*a*c))/(a*2);
        cout << setprecision(5) << fixed;
        printf("x1=%.5f;x2=%.5f\n",x1,x2);
    }
    else if((b*b-4*a*c)==0)
    {
           x1 = (0-b+sqrt(b*b-4*a*c))/(a*2);
        x2 = (0-b-sqrt(b*b-4*a*c))/(a*2);
        cout << setprecision(5) << fixed;
       printf("x1=x2=%.5f\n",x1);
    }
    else if((b*b-4*a*c)<0)
    {
           x1 = (0-b)/(a*2);
           p=sqrt(4*a*c-b*b)/(a*2);
        x2 = (0-b)/(a*2);
        q=-sqrt(4*a*c-b*b)/(a*2);
        cout << setprecision(5) << fixed;
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,p,x2,p);
    }
}
    return 0;

}
int main()
{
    double i,n,x1,x2;
    float a,b,c,x,y;
    cin>>n;
    for(i=1;i<=n;i++)
{     cin>>a>>b>>c;
     if(b==0)
{    
     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;",x1);
      printf("x2=%.5f\n",x2);
}
      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=x2=%.5f\n",x1);
}
      else
{
      x = (b /(2*a)); 
      y = (sqrt(-b*b+4*a*c))/(2*a);
      printf("x1=%.5f+%.5fi;",x,y);
      printf("x2=%.5f-%.5fi\n",x,y);
}
 }
     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=%.5f;",x1);
      printf("x2=%.5f\n",x2);
}
      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=x2=%.5f\n",x1);
}
      else
{
      x = (-b /(2*a)); 
      y = (sqrt(-b*b+4*a*c))/(2*a);
      printf("x1=%.5f+%.5fi;",x,y);
      printf("x2=%.5f-%.5fi\n",x,y);
}
}
}
       return 0;
}
main()
{
      int n,i;
      double a,b,c,d,e,f,x1,x2;
      scanf("%d\n",&n);
      for(i=1;i<=n;i++)
      {
                       
      scanf("%lf %lf %lf",&a ,&b, &c);
         d=b*b-4*a*c;
         if (d>0)
         {
                 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;x2=%.5lf\n",x1,x2);
         }
         if(d==0)
         {
                 x1 = (0-b)/(2*a) ;
                 printf("x1=x2=%.5f\n",x1);
         }
         if(d<0)
         {
                e=(0-b)/(2*a);
                f= sqrt(-d)/(2*a);
                printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
         }
     }
}
int main()
{
	int k,num;
	cin >> num;
	for ( k=0 ; k<num ; k++ ) 
	{
		double a,b,c,x1,x2,sb,xb;
        cin>>a>>b>>c;
		x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
        x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
		sb = -b/(2*a);
		xb = (sqrt(4*a*c-b*b))/(2*a);
		if (fabs(sb)<0.000001)                              
			sb=0;                                           
			cout<<fixed;
		if ((b*b-4*a*c)>=0) 
		{
			if (x1==x2) cout << setprecision(5) << "x1=x2=" << x1 << endl;
			else cout << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else cout << setprecision(5) << "x1=" << sb << "+" << xb << "i" << ";" << "x2=" << sb << "-" << xb << "i" << endl;
	}
	return 0;
}
void coutnoneg (double a)
{
	if(a==0) cout<<0.0;
	else cout<<a;
}
int main()
{
	int n;
	double a,b,c,d,x1,x2;
	cout<<fixed<<setprecision(5);
	for(cin>>n;n--;)
	{
      cin>>a>>b>>c;
	  d=b*b-4*a*c;
	  if(d>0)
	   {
	     x1 = ( -b + sqrt(b*b-4*a*c))/(2*a);
		 x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
		 cout<<"x1=";
		 coutnoneg(x1);
		 cout<<";x2=";
		 coutnoneg(x2); 
	   }
	  if(d==0)
	   {
		  x1 = (-1*b)/(2*a);
          cout<<"x1=x2=";
		  coutnoneg(x1);	   
	   }
	  else if(d<0)
	   {
        x1 = (-b)/(2*a);
		x2 = sqrt(-d)/(2*a);
		cout<<"x1=";
		coutnoneg(x1);
		cout<<'+';
		coutnoneg(x2);
		cout<<"i";
		cout<<";x2=";
		coutnoneg(x1);
		cout<<'-';
		coutnoneg(x2);
		cout<<"i";
	   }
cout<<endl;	
	}
return 0;
}
//x1 = (-b + sqrt(b*b-4*a*c))/(2*a) 
//x2 = (-b - sqrt(b*b-4*a*c))/(2*a) 
//??????? ax2 + bx + c = 0 ?????a???0?
int main()
{
	int n,i;
	cin >> n;
	for(i = 1;i<=n;i++)
	{
		double a,b,c,delta,x1,x2;
		cin >> 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=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(delta==0)
		{
			x1=x2=-b/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		else
		{
			double antidel=fabs(delta);
			double d,e,f;
			d=(sqrt(antidel))/(2*a);
			f=fabs(d);
			if(b!=0)e=-b/2/a;
			else e=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
		}
	}
		return 0;
	}
int main(int argc, char* argv[])
{
	int n,i;
	double a,b,c,d,e;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		d=b*b-4*a*c;
		if (b==0)
			e=0;
		else
			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=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", e,sqrt(-d)/(2*a),e,sqrt(-d)/(2*a));
	
	else if(d==0)
		printf("x1=x2=%.5lf\n",e);
}
return 0;
}
int main()
{
	int n,i;
	cin>>n;
	i=0;
	double a[100],b[100],c[100],x1,x2,xubu;
	while (i<n)
	{
		cin>>a[i]>>b[i]>>c[i];
		i++;
	}
	i=0;
	while(i<n)
	{
		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]);
			if(x1==-0) x1=0;
			if(x2==-0) x2=0;
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
			i++;
		}
		else if (b[i]*b[i]-4*a[i]*c[i]==0)
		{
			x1=x2=(-b[i])/(2*a[i]);
			if(x1==-0) x1=x2=0;
			printf("x1=x2=%.5f\n",x1,x2);
			i++;
		}
		else
		{
			xubu=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
			x1=x2=(-b[i])/(2*a[i]);
			if(x1==-0) x1=x2=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,xubu,x2,xubu);
			i++;
		}
	}
	return 0;
}
int main()
{
float a,b,c;
double m,n,x,y;
cin>>n;
for(m=1;m<=n;m=m+1){
	cin>>a>>b>>c;
	if(b*b-4*a*c>=0){
	x = (-b + sqrt(b*b-4*a*c))/(2*a); 
    y = (-b - sqrt(b*b-4*a*c))/(2*a);
	if(x!=y)
	printf("x1=%.5f;x2=%.5f\n",x,y);
	else if(x==y)
		printf("x1=x2=%.5f\n",x);}
	else if(b*b-4*a*c<0){
		x=b/2/a*(-1);
		y=(sqrt(-b*b+4*a*c))/2/a;
		if(x!=0)
		printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x,y,x,y);
		else if(x==0)
	    printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",y,y);
	}
}
return 0;
}
int main(int argc, char* argv[])
{
	int i,n;
	double a,b,c,p,q;
	double x1,x2,s;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%lf%lf%lf",&a,&b,&c);
	
	s=b*b-4*a*c;
	if(s>0){
		x1 = (-b + sqrt(s))/(2*a);
			x2 = (-b - sqrt(s))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
	}
	else if(s==0){
		x1=-b/(2*a);
		printf("x1=x2=%.5f\n",x1);
	}
	 else{ if(b!=0)
	 {double p=sqrt(-s)/(2*a),q=-b/(2*a);
      printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",q,p,q,p);
	}
	  else
	{double p=sqrt(-s)/(2*a),q=0.00000;
	  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",q,p,q,p);
	}

	}
	}
	return 0;}
/*?????????
???
2012?10?7?10:46:21*/
int main()
{
    int n,i;
    float a[1000],b[1000],c[1000];
    double x1[1000],x2[1000],d[1000],D[1000],y[1000];
    cin>>n;                                      //??????n 
    for(i=1;i<=n;i++)                            //???i=n??? 
    {
    cin>>a[i]>>b[i]>>c[i];                      //??3??? 
    d[i]=b[i]*b[i]-4*a[i]*c[i];                 //??? 
    if(d[i]==0)                                 //???=0????? 
    {x1[i]=(0-b[i])/(2*a[i]);
    cout<<fixed<<setprecision(5)<<"x1=x2="<<x1[i]<<endl;
}
    if(d[i]>0)                                  //???>0 ??????? 
    {x1[i]=(sqrt(d[i])-b[i])/(2*a[i]),x2[i]=(0-sqrt(d[i])-b[i])/(2*a[i]);
    cout<<fixed<<setprecision(5)<<"x1="<<x1[i]<<";x2="<<x2[i]<<endl;
}
    if(d[i]<0)                                  //???<0??????? 
    {D[i]=0-d[i];
    x1[i]=sqrt(D[i])/(2*a[i]);
    y[i]=(0-b[i])/(2*a[i]);
    cout<<fixed<<setprecision(5)<<"x1="<<y[i]<<"+"<< x1[i]<<"i;x2="<<y[i]<<"-"<<x1[i]<<"i"<<endl;
}}
    return 0;
}
/*
 * 1.cpp
 *  Created on: 2012-9-28
 *  Author: ???
 *  ??:?????????
 */
int main(){
	int n;//???????
	cin>>n;//?????
	while(n--){//??n?????
		double a,b,c,d,e,delt=0.0,x1,x2;//????a,b,c,d,e,delt,x1,x2
		cin>>a>>b>>c;//???????a,b,c
		delt=b*b-4*a*c;//?delt??b*b-4*a*c
		if(delt==0){//??delt ??0
			x1=x2=(-b)/(2*a);//?x1?x2?????
			printf("x1=x2=%.5f\n",x1);//??x1,x2
		}
		else if(delt<0){//???delt??0??x1,x2???
			d=(-b)/(2*a),e=sqrt(4*a*c-b*b)/(2*a);
			if (d<=0&&d>-0.000001) d=0.0000001;//??d????d??0.0000001
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d,e,d,e);//??x1,x2
		}
		else {//??x1,x2?????
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
			x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);//??x1,x2
		}

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

			e=-d;
			f=sqrt(e)/(2*a);
			g=(-b)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",g,f,g,f);
			}
		}
	}
	return 0;
}
int main()
{ 
    int n;   //?? n ????? 
    double a, b, c, delta, x1, x2;   //?? a,b,c,delta,x1,x2 ?????????
    cin >> n;   //??n 
    cout << fixed;
    for (int i = 1; i <= n; i++)
    {
        cin >> a >> b >> c;   //??a,b,c
        delta = b * b - 4 * a * c;
        if (delta > 0)   //??2?? 
        {
             x1 = (-b + sqrt(delta)) / (2 * a);   //??x1 
             x2 = (-b - sqrt(delta)) / (2 * a);   //??x2 
             if (x1 == 0)
             {
                 x1 = 0;
             } 
             if (x2 == 0)
             {
                 x2 = 0;
             }
             cout << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;   //??x1,x2 ?????????? 
        }
        else if (delta == 0)   //??2????
        {
             x1 = -b / (2 * a);   //??x 
             if (x1 == 0)
             {
                 x1 = 0;
             }
             cout << setprecision(5) << "x1=x2=" << x1 <<endl;   //??x ??????????
        }
        else
        {
             x1 = -b / (2 * a);   //????
             if (x1 == 0)
             {
                 x1 = 0;
             }
             x2 = sqrt(-delta) / (2 * a);   //??????? 
             cout << setprecision(5) << "x1=" << x1 << "+" << x2 << "i" << 
             ";x2=" << x1 << "-" << x2 << "i" << endl;   //???? ??????????
        }
    } 
    return 0;                    
}
/*
 * 2.cpp
 *
 *  Created on: 2012-9-29
 *      Author: 12162
 *      ????????
 */

int i,n;
double a, b, c,j;
double x[2];
int main()
{
	cin>>n;//?????????
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;//????????
		if(b==0)//??0???
		{b=-b;}
		
		j=b*b-4*a*c;

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

			cout<<"x1=";
			printf("%.5f", -b/(2*a));
			cout<<"+";
			printf("%.5f",sqrt(4*a*c-b*b)/(2*a));
			cout<<"i"<<";"<<"x2=";
			printf("%.5f", -b/(2*a));
			printf("%.5f",-sqrt(4*a*c-b*b)/(2*a));
			cout<<"i";
			cout<<endl;
		}

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

			}
		}
		return 0;
}
double f5(double x)
{
       long long y;
       if(x>0)
       y=(x+0.000005)*100000;
       else y=(x-0.000005)*100000;
       x=(double)y/100000;
       x=x;
       return x;
}
int main()
{
    int n,i;
    scanf("%d",&n);
    double a,b,c,delta,p,q,p1,q1,r;
    for(i=1;i<=n;i++)
    {
                     scanf("%lf %lf %lf",&a,&b,&c);
                     delta=b*b-4*a*c;
                     q=sqrt(fabs(delta));
                     q1=sqrt(fabs(delta))/(2*a);
                     p=-b;
                     p1=-b/(2*a);
                     r=2*a;
                     if(q>=0.000005&&delta>0)printf("x1=%.5lf;x2=%.5f\n",f5((p+q)/r),f5((p-q)/r));
                     else if(delta<0)printf("x1=%.5lf+%.5fi;x2=%.5lf-%.5lfi\n",f5(p1),q1,f5(p1),q1);
                     else printf("x1=x2=%.5f\n",f5(p1));
    }     
    
    return 0;
}