题目描述
看好给出的式子,去应用它。
样例
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
double a,b,c,m;
cin>>a>>b>>c;
m=sqrt(b*b-4*a*c);
if((b*b-4*a*c)<0||a==0)
cout<<"Impossivel calcular"<<endl;
else
cout<<fixed<<setprecision(5)<<"R1 = "<<(-b+m)/(2*a)<<endl;
cout<<fixed<<setprecision(5)<<"R2 = "<<(-b-m)/(2*a)<<endl;
return 0;
}