1 solutions

  • 0
    @ 2025-11-5 19:08:34

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<cmath>
    using namespace std;
    int main()
    {
    	double a,b,c;
    	cin>>a>>b>>c;
    	double dis=b*b-4*a*c;
    	double p=-b/(2*a),q=sqrt(dis)/(2*a);
    	printf("%.2lf %.2lf\n",p+q,p-q);
    	return 0;
    } 
    
    • 1

    Information

    ID
    19195
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By