#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
const double eps = 1e-6;
int main()
{
double a,b,c,dis,x1,x2; cin>>a>>b>>c; dis = b*b-4*a*c; if (dis<-eps) cout<<"No answer!\n"; else if (fabs(dis)<=eps) printf("x1=x2=%.5lf\n",(-b)/(2*a)); else { x1=(-b+sqrt(dis))/(2*a); x2=(-b-sqrt(dis))/(2*a); if (x1>x2) { double t=x1; x1=x2; x2=t; } printf("x1=%.5lf;x2=%.5lf\n",x1,x2); } return 0; }

 

posted on 2022-05-13 15:29  禹城我的家  阅读(165)  评论(0)    收藏  举报