Câu 2:
#include <bits/stdc++.h>
using namespace std;
double a,b,c,delta,x1,x2;
int main()
{
//freopen("PTB2.inp","r",stdin);
//freopen("PTB2.out","w",stdout);
cin>>a>>b>>c;
delta=(b*b-4*a*c);
if (delta<0) cout<<"-1";
if (delta==0) cout<<fixed<<setprecision(5)<<(-b/(2*a));
if (delta>0)
{
x1=(-b-sqrt(delta))/(2*a);
x2=(-b+sqrt(delta))/(2*a);
cout<<fixed<<setprecision(5)<<x1<<" "<<fixed<<setprecision(5)<<x2;
}
return 0;
}