Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <iomanip>
- using namespace std;
- int main()
- {
- long double a, b, c, x;
- cin>>a;
- cin>>b;
- cin>>c;
- x=(b+(sqrt((b*b)-(a*c))))/(2*a);
- cout<<fixed<<setprecision(3)<<x<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment