semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**************************** 
*file:6.cpp
*author:|? 
*time:2013-10-9 
*description:
*?????????????? 
*****************************/ 
int main()
{
    int n; //??????n???n????? 
    cin >> n;
    double a[n], b[n], c[n], x[n], y[n]; //???????a,b,c,x,y;?????????????????????x,y????? 
    double p[n];//???????p???????????? 
    for (int i = 0; i < n; i++)
    {
        cin >> a[i] >> b[i] >> c[i]; //???? 
    }
    for (int i = 0; i < n; i++)
    {   
        p[i] = b[i] * b[i] - 4 * a[i] * c[i]; //p[i]???? 
        x[i] = b[i] / (2 * a[i]); //?????????????x[i] 
        if (p[i] > 0) //?????0 
        {
	        y[i] = sqrt(p[i]) / (2 * a[i]); //????????y[i] 
            cout << "x1=" << fixed << setprecision(5) << - x[i] + y[i] << 
            ";x2=" << - x[i] - y[i] << endl; //??????????5??? 
	    }
        if (p[i] < 0) //?????0 
        {
	        y[i] = sqrt(-p[i]) / (2 * a[i]); //??y[i]????????? 
	        if (x[i] == 0) //?????????x[i]?0???????-0????x[i]==0??????????? 
	        {
		        cout << "x1=" << 0.00000 << '+' << abs(y[i]) << 'i' << 
                ";x2=" << 0.00000 << '-' << abs(y[i]) << 'i' << endl;
	        } //????????????????5?????????0.00000 
	        else
                cout << "x1=" << fixed << setprecision(5) << -x[i] << '+' << abs(y[i]) 
                << 'i' << ";x2=" << -x[i] << '-' << abs(y[i]) << 'i' << endl;
        } //?x[i]??0???????-0????????????????5??? 
        if (p[i] == 0) //?????0??? 
            cout << "x1=x2=" << fixed << setprecision(5) << -x[i] <<endl;//????????????5??? 
    }
    return 0;
}
int main(void)
{
  double a=1.0,b=1.0,c=1.0;
  int n=1,k=1;
  scanf("%d",&n);
  double e[100],f[100],g[100];
  for(k=0;k<n;k++)
  {
    scanf("%lf %lf %lf",&e[k],&f[k],&g[k]);
  }

	 
  for(k=0;k<n;k++)
	  {
		  a=e[k];b=f[k];c=g[k];
		  if(b*b-4*a*c==0)
			  printf("x1=x2=%.5lf\n",-b/(2*a));
		  else if(b*b-4*a*c>0)
		   			  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<0)
		  {  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 argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	double p[10][3];
	for(int i=0;i<n;i++){
		double a,b,c;
		p[i][0]=a;
		p[i][1]=b;
		p[i][2]=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=%.5f;x2=%.5f\n",x1,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 if((b*b-4*a*c)<0){
			double d,e;
			if(b!=0){
			   d=-b/(2*a);
			}
			else if(b==0){
               d=b/(2*a);
			}
			e=sqrt(4*a*c-b*b)/(2*a);
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d,e,d,e);
		}
		else;
	}
		return 0;
}
int main()
{
	int n,i;
	double a,b,c,di;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		di=b*b-a*c*4;
		if (di<0)
		{
			di=di*(-1);
			if(b/(2*a)<0.000001&&-0.000001<b/(2*a))
			{
				b=0;
				printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n",b/(2*a),sqrt(di)/(2*a),b/(2*a),(-1)*sqrt(di)/(2*a));
			}
			else
			printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n",(-1)*b/(2*a),sqrt(di)/(2*a),(-1)*b/(2*a),(-1)*sqrt(di)/(2*a));
			di=-1;
		}
		if(di==0)
		{
			//printf("%lf\n",(abs(b/(2*a))));
			if(b/(2*a)<0.000001&&-0.000001<b/(2*a))
			{
				b=0;
				printf("x1=x2=%.5lf\n",b/(2*a));
			}
			printf("x1=x2=%.5lf\n",(-1)*b/(2*a));
		}
		if(di>0)
		{
			if(b/(2*a)<0.000001&&-0.000001<b/(2*a))
			{
				b=0;
				printf("x1=%.5lf;x2=%.5lf\n",b/(2*a)+sqrt(di)/(2*a),b/(2*a)+(-1)*sqrt(di)/(2*a));
			}
			printf("x1=%.5lf;x2=%.5lf\n",(-1)*b/(2*a)+sqrt(di)/(2*a),(-1)*b/(2*a)+(-1)*sqrt(di)/(2*a));
		}
	}
}
int main()
{
	int n;
	scanf("%d",&n);
	int i;
	double a,b,c;
	for (i=0;i<n;i++)
	{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;",x1);
	printf("x2=%.5lf\n",x2);}

	
	if((b*b-4*a*c)==0)
	{x1=(-b/(2*a));
	printf("x1=x2=%.5lf\n",x1);}
	
	if((b*b-4*a*c)<0)
	{x1=(sqrt(4*a*c-b*b))/(2*a);
	x2=(sqrt(4*a*c-b*b))/(2*a);
	printf("x1=%.5lf+%.5lfi;",-b/(2*a),x1);
	printf("x2=%.5lf-%.5lfi\n",-b/(2*a),x2);}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	double a,b,c,x1,x2,disc,p,q;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf", &a, &b, &c);
		disc=b*b-4*a*c;
		if(disc>0)
		{
			q=sqrt(disc);
			x1=((-1)*b+q)/(2*a);
			x2=((-1)*b-q)/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if(disc==0)
		{
			p=(-1)*b/(2*a);
			printf("x1=x2=%.5lf\n",p);
		}
		else if(disc<0)
		{
            q=sqrt((-1)*disc)/(2*a);
            p=(-1)*b/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", p, q, p, q);
		}
	}
	return 0;
}
//********************************
//*??  ?????????  *****
//*????? 1300012753     ***** 
//*???2013.10.09          *****  
//********************************
int main()
{
    int n;          // n???????? 
    cin >> n;       // ??n
    
    // ????????
    for (int i = 1; i <= n; i++)
    {
        double a, b, c;                  // a?b?c?????? 
        cin >> a >> b >> c;
        double x1, x2, deta;             // ??x1 x2???????deta??b^2-4ac 

        // ????????? 
        deta = b * b - 4.0 * a * c;
        if (deta == 0)                  // ??deta??0??x1=x2?????? 
        {
            x1 = (-b) / (2.0 * a);
            if(x1 == -0)                // ??x1?????-0????0 
            {
                  x1 = 0;
            }
            printf("x1=x2=%.5lf\n", x1);         
        }
        else if(deta > 0)               
        {
             x1 = (-b + sqrt(deta)) / (2 * a);
             x2 = (-b - sqrt(deta)) / (2 * a);
             if(x1 == -0)
            {
                  x1 = 0;
            }
            if(x2 == -0)
            {
                  x2 = 0;
            }
             printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
        }
        else                           // ??deta??0??????????? 
        {
            double s, x;
            s = (-b) / (2.0 * a);
            x = (sqrt(-deta)) / (2 * a);
            if(s == -0)
            {
                  s = 0;
            }
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", s, x, s, x);
        }
    }
    return 0; 
}
main()
{
      int n,q;
      scanf("%d",&n); 
      double p[n][3];
      int j;
      for(j=0;j<n;j++)
      {
      scanf("%lf %lf %lf",&p[j][0],&p[j][1],&p[j][2]);
      }
      for(q=0;q<n;q++)
      {
      double a,b,c,x1,x2,d,e;
      a=p[q][0];b=p[q][1];c=p[q][2];
      if(b*b-4*a*c>0)
      {x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
       x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
       printf("x1=%.5f;x2=%.5f\n",x1,x2);
                     }
       else
       {if(b*b-4*a*c==0)
       {
       x1=-b/(2*a);
       x2=-b/(2*a);
       printf("x1=x2=%.5f\n",x1);
       }
       else
       {
       d=0-b/(2*a);
       e=(sqrt(4*a*c-b*b))/(2*a);
       printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",d,e,d,e);
       }
       }
      }
        }
int main()
{

         const int max=100;
         double a[max],b[max],c[max],x1,x2,delta;
	int n,i;
	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++)
	{
		delta=b[i]*b[i]-4*a[i]*c[i];
		if (delta>0)
		{
			x1=(-b[i]+sqrt(delta))/(2*a[i]);
			x2=(-b[i]-sqrt(delta))/(2*a[i]);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if (delta==0) printf("x1=x2=%.5f\n",-b[i]/(2*a[i]));
		else
		{
			x1=-b[i]/(2*a[i]);
			x2=sqrt(-delta)/(2*a[i]);
			if (x2<0) x2=-x2;
                            if (x1==0) x1=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);
		}
	}
	return 0;
}
//********************************
//*?????????           **
//*????? 1300012848        **
//*???2013.10.10             **
//********************************
int main()
{
	int n;
	double a,b,c,z;
	cin >> n;
	for(int i = 1; i <= n; i++)
	{	
		cin >> a >> b >> c;
		z = -b / (2 * a);
		if (z == -0)
			z = 0;
		if(b * b - 4 * a * c > 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(b * b - 4 * a * c == 0)
		{
			cout << "x1=x2=";
			printf("%.5f",z);
			cout << endl;
		}
		if(b * b - 4 * a * c < 0)
		{
			cout << "x1=";
			printf("%.5f",z);
		    cout << "+";
			printf("%.5f",sqrt(4 * a * c - b * b)/(2 * a));
			cout << "i;x2=";
			printf("%.5f",z);
			cout << "-";
			printf("%.5f",sqrt(4 * a * c - b * b)/(2 * a));
			cout << "i" << endl;
		}
	}
	return 0;
}
int main()
{
    int n,i;
    double a,b,c,x1,x2;
    cin>>n;
    for(i=1;i<=n;i++)
    {
         cin>>a>>b>>c;
         if((b*b-4*a*c)>0)
         {
         x1=(-b+sqrt(b*b-4*a*c))/(2*a);
         x2=(-b-sqrt(b*b-4*a*c))/(2*a);
         printf("x1=%.5f;x2=%.5f\n",x1,x2);      
         continue;        
         }
         if((b*b-4*a*c)==0)
         {                  
         x1=x2=(-b)/(2*a);
         printf("x1=x2=%.5f\n",x1);
         continue;                
         }
         if((b*b-4*a*c)<0)
         {
         x1=(-b)/(2*a);
         x2=sqrt(4*a*c-b*b)/(2*a);
         if(x1==0)
         x1=0;
         printf("x1=%.5f""+""%.5fi;x2=%.5f""-""%.5fi\n",x1,x2,x1,x2);            
         continue;
         }             
    }
    return 0;    
}
int main()
{
	double a[100],b[100],c[100],x1[100],x2[100],s[100],x[100];
	int n,i;
	scanf("%d",&n);
	for(i=1;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[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;",x1[i]);
				printf("x2=%.5lf\n",x2[i]);
			}
			else if(b[i]*b[i]-4*a[i]*c[i]==0)
			{
				x1[i]=x2[i]=-b[i]/(2*a[i]);
				printf("x1=x2=%.5lf\n",x1[i]);
			}
			else
			{s[i]= -b[i]/(2*a[i]);
				x[i]=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
				printf("x1=%.5lf+%.5lfi;",s[i],x[i]);
				printf("x2=%.5lf-%.5lfi\n",s[i],x[i]);
			}
	}
	return 0;
}
int main()
{
    int n;
    int i;
    cin>>n;
    double a,b,c;
    for(i=1;i<=n;i++) 
    { 
                      cin>>a>>b>>c;
                      if(b*b-4*a*c>=0)
                      {
                      
                                      double x1,x2;
                                      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=%.5f\n", x1); 
                                      else  printf("x1=%.5f;x2=%.5f\n" ,x1,x2);
                      }
                      else
                      {
                          double x11,x12,x21,x22;
                          x11=(-b)/(2*a);
                          x12=+sqrt(-b*b+4*a*c)/(2*a);
                          x21=(-b)/(2*a);
                          x22=-sqrt(-b*b+4*a*c)/(2*a);
                          if(b==0)  printf("x1=0.00000+%.5fi;x2=0.00000%.5fi\n",x12,x22);
                          else      printf("x1=%.5f+%.5fi;x2=%.5f%.5fi\n",x11,x12,x21,x22);
                      }
    }
    return 0;
}
int main()
{
	int n,i;
	
	double a,b,c,e,d;
	scanf("%d\n",&n);
	
	for (i=0;i<n;i++)

	{
		scanf("%lf%lf%lf",&a,&b,&c);
		e=b*b-4*a*c;
		d=(-b/(2*a));


	
         if(e>0)
	        printf("x1=%.5lf;x2=%.5lf\n",d+sqrt(e)/(2*a),d-sqrt(e)/(2*a));
	     else if(e==0)
	        printf("x1=x2=%.5lf\n",d);
         else
	        printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",d,sqrt(-e)/(2*a),d,sqrt(-e)/(2*a)); 
	 }
	return 0;
}
main()
{
      int j,n;
      double q[100],w[100],e[100],a,b,c,p,x1,x2,h,g;
      scanf("%d",&n);
      for(j=0;j<=n-1;j++)
      {
                         scanf("%lf %lf %lf",&q[j],&w[j],&e[j]);
      }
      for(j=0;j<=n-1;j++)
      {
                         a=q[j];
                         b=w[j];
                         c=e[j];
                         p=b*b-4*a*c;
                         if (p>0)
                         {
                                if(b!=0)
                                {
                                x1=(-b+sqrt(p))/(2*a);
                                x2=(-b-sqrt(p))/(2*a);
                                printf("x1=%.5lf;x2=%.5lf",x1,x2);
                                printf("\n");
                                }
                                else
                                printf("x1=%.5lf;x2=-%.5lf",sqrt(p)/(2*a),sqrt(p)/(2*a));
                         }
                         else
                         if (p==0)
                         {
                                 if(b!=0)
                                 {
                                         x1=x2=-b/(2*a);
                                         printf("x1=x2=%.5lf",x2);
                                 }
                                 else
                                 printf("x1=x2=0.00000");
                                 printf("\n");
                         }
                         else
                         {
                             if(b!=0)
                             {
                             
                                     h=-b/(2*a);
                                     g=(sqrt(-p))/(2*a);
                                     printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi",h,g,h,g);
                             }
                             else
                             {
                             g=(sqrt(-p))/(2*a);
                             printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi",g,g);
                             }
                             printf("\n");
                         }
      }
      getchar();
       getchar(); 
}
int file0()
{float a,b,c;
      scanf("%f%f%f",&a,&b,&c);
          double x1,x2,p,e,f; 
          a=4*a;
          b=4*b;
          c=4*c;
            
            p=b*b-4*a*c;  
            if(p>0) 
           { x1=(-b+sqrt(p))/(2*a); 
             x2=(-b-sqrt(p))/(2*a); 
            
             printf("x1=%.5f;x2=%.5f\n",x1,x2);
            }
            
           else if(p==0) 
           { 
           x1=x2=(-b+sqrt(p))/2*a; 
           printf("x1=x2=%.5f\n",x1);
           
           } 
           else if(p<0)
           {
           e=-b/(2*a);
           f=sqrt(-p)/(2*a);
           if(e==-0)
           e=0;
          
           printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",e,f,e,f);
           
           }  
           
} 
main()
{
      int n,r;
      scanf("%d",&n);
      r=0;
      for(r=0;r<=n;r++)
     { if(r<n)
      
      file0();
      }        
return 0;
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int i=0;
	do{
		double a,b,c;
		scanf("%lf%lf%lf",&a,&b,&c);
       double x1,x2;
		if(b*b-4*a*c>0)
		{{if(b!=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=%.5f\n",x1,x2);}}
		{if(b==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=%.5f\n",x1,x2);}}}
		if(b*b-4*a*c==0)
		{{if(b!=0)
			{x1=x2=(-b + sqrt(b*b-4*a*c))/(2*a);
		printf("x1=x2=%.5lf\n",x1);}}
		{if(b==0)
			{x1=x2=(-b + sqrt(b*b-4*a*c))/(2*a);
		printf("x1=x2=%.5lf\n",x1);}}}
		if(b*b-4*a*c<0)
		{{if(b!=0)
		{double e,f;
		e=sqrt(4*a*c-b*b)/(2*a);
		f=sqrt(4*a*c-b*b)/(2*a);
		x1=-b/(2*a);
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,e,x1,f);}}
		{if(b==0)
			{double e,f;
		e=sqrt(4*a*c-b*b)/(2*a);
		f=sqrt(4*a*c-b*b)/(2*a);
		x1=b/(2*a);
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,e,x1,f);}}}

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

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

   }
	return 0;
}
int main()
{

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

    scanf("%d", &repeat);
    for(ri = 1; ri <= repeat; ri++)
    {
        scanf("%lf %lf %lf", &a, &b, &c);
        d=b*b-4*a*c;
        if (d>0) 
           {
                 printf("x1=%.5f;", (-b+sqrt(d))/(2*a));
                 printf("x2=%.5f\n", (-b-sqrt(d))/(2*a));
           }
        else if (d<0) 
        {
             if (b==0)  
                {
                       printf("x1=0.00000+%0.5fi;", sqrt(-d)/(2*a));
                       printf("x2=0.00000-%0.5fi\n", sqrt(-d)/(2*a));
                 }
             else 
                {
                       printf("x1=%.5f+%0.5fi;", -b/(2*a), sqrt(-d)/(2*a));
                       printf("x2=%.5f-%0.5fi\n", -b/(2*a), sqrt(-d)/(2*a));
                } 
           }  
        else printf("x1=x2=%.5f\n", -b/(2*a)); 
    }  
    return(0);   
}
int main()
{
 int n,m;
 double a,b,c,x,y,p,q,disc;
 scanf("%d",&n);
 for(m=1;m<=n;m++)
 {
  scanf("%lf %lf %lf",&a,&b,&c);
  disc=b*b-4*a*c;
  p=-b;
  p=p/2;
  p=p/a;
  if (disc>0) 
  {
   q=sqrt(disc);
   q=q/2.0;
   q=q/a;
   x=p+q;y=p-q;
   printf("x1=%.5f;x2=%.5f",x,y);
   printf("\n");
  }
  else if (disc==0)
  {
   printf("x1=x2=%.5f",p);
   printf("\n");
  }
  else
  {
   disc=-disc;
   q=sqrt(disc);
   q=q/2.0;
   q=q/a;
   if(p==-0) p=0;
   printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",p,q,p,q);
   printf("\n");
  }
 }
 return 0;
}
void main()
{
	double x1[32768],x2[32768],xi[32768],a,b,c,t;
	int n,i;
	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)
		{
		x1[i]=(-b+sqrt(t))/(2*a);
	    x2[i]=(-b-sqrt(t))/(2*a);
		if(fabs(x1[i])<1e-6) x1[i]=0;
		if(fabs(x2[i])<1e-6) x2[i]=0;
		}
		else if(t<0)
		{
			x1[i]=x2[i]=-b/(2*a);
			if(fabs(x1[i])<1e-6) x1[i]=x2[i]=0;
			xi[i]=sqrt(-t)/(2*a);
		}
	}
	for (i=1;i<=n;i++)
	{
		if(fabs(xi[i])<=1e-6)
		{
			if(x1[i]==x2[i]) printf("x1=x2=%.5f\n",x1[i],x2[i]);
				else printf("x1=%.5f;x2=%.5f\n",x1[i],x2[i]);
		}
		else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1[i],xi[i],x2[i],xi[i]);
	}
}
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 = (0 - 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", (0 - b) / (2 * a));
		}
	}
	return 0;
}
int main()
{
    int n;
    double d[20];/*????????*/ 
    double e[20];
    double f[20];
    scanf("%d",&n);
    int s,t;
    double a,b,c,x1,x2,y,z;
    for (s=1;s<=n;s++)
      scanf("%lf %lf %lf",&d[s],&e[s],&f[s]);
    for(t=1;t<=n;t++)
      {
      a=d[t];/*?????????*/ 
      b=e[t];
      c=f[t];
      
    if(b*b-4*a*c>=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=%.5lf;x2=%.5lf\n",x1,x2);
        }
      else
        {
        x1=(-b)/(2*a);
        x2=(-b)/(2*a);
        printf("x1=x2=%.5lf\n",x1);
        }
      }
    else
      {
      y=(-b)/(2*a);
      z=sqrt(4*a*c-b*b)/(2*a);
      if (fabs(y)<0.00001) y=0;
      printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",y,z,y,z);
      }
}
getchar();
getchar();
return 0;
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int m;
	double a,b,c,x1,x2,dt,xubu,shibu;
	for (m=1;m<n+1;m++)
	{
		scanf("%lf""%lf""%lf",&a,&b,&c);
		dt=b*b-4*a*c;
		if (dt>0)
		{
			x1=(-b+sqrt(dt))/(a*2);
                            x2=(-b-sqrt(dt))/(a*2);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if (dt==0)
		{
			x1=(-b)/(a*2);
			printf("x1=x2=%.5lf\n",x1);
		}
		else if (dt<0)
		{
			xubu=(sqrt(-dt))/(2*a);
			shibu=(-b)/(a*2);
                            if(shibu==0)
                            {
              printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-shibu,xubu,-shibu,xubu);
		}
else if(shibu==-0)
{printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-shibu,xubu,-shibu,xubu);}
else
{
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",shibu,xubu,shibu,xubu);}



	}
}

			



	return 0;
}
int main ()
{
 double a,b,c,d,e,q,x1,x2;
 int n,i=0;
 scanf("%d",&n);
 while(i<n)
 {scanf("%lf%lf%lf",&a,&b,&c);
  d=b*b-4*a*c;
  if(d>0)
   {x1=(-b+sqrt(d))/(2*a);
    x2=(-b-sqrt(d))/(2*a);
    printf("x1=%.5f;x2=%.5f\n",x1,x2);}
  if(d==0)
   {x1=-b/(2*a);
    printf("x1=x2=%.5f\n",x1);}
  if(d<0)
   {e=(sqrt(-d))/(2*a);
    if(b!=0)
     {q=(-b)/(2*a);
      printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",q,e,q,e);}
	else
	  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,e,b,e);}
  i=i+1;	      
 }
 return 0;	
}
void main()
{
int n,i=1;
double a[100],b[100],c[100],x1,x2,realpart,imagpart,disc;
scanf("%d",&n);

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

			printf ("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", realpart,imagpart, realpart,imagpart);
		}
	}
     i+=1;
}
}
int main()
{
	int n,i,k;
	double s,t,m;
	scanf("%d",&n);
	double a[100];
	for(i=0;i<3*n;i++)
		scanf("%lf",&a[i]);
	for(k=0;k<3*n;k++)
	{
		if(k%3==0)
		{
			m=a[k+1]*a[k+1]-4*a[k]*a[k+2];
			if(m>0)
			{
               s=(-a[k+1]+sqrt(m))/(2*a[k]);
			   t=(-a[k+1]-sqrt(m))/(2*a[k]);
			   printf("x1=%.5lf;x2=%.5lf\n",s,t);
			}
            if(m==0)
			{
				s=(-a[k+1])/(2*a[k]);
				printf("x1=x2=%.5lf\n",s);
			}
			if(m<0)
			{
				s=(-a[k+1])/(2*a[k]);
				t=(sqrt(-m))/(2*a[k]);
				if(s==0)
					printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",t,t);
				else
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",s,t,s,t);
			}
		}
		else continue;
	}
	return 0;
}