rengetsu

ProcedurProgramavimas_1.04

Feb 19th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6. int main()
  7. {
  8.     long double a, b, c, x;
  9.     cin>>a;
  10.     cin>>b;
  11.     cin>>c;
  12.  
  13.     x=(b+(sqrt((b*b)-(a*c))))/(2*a);
  14.     cout<<fixed<<setprecision(3)<<x<<endl;
  15.  
  16.     return 0;
  17. }
Add Comment
Please, Sign In to add comment