K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

23 tháng 12 2021

1B

2B

23 tháng 12 2021

#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;
}