Advertisement
rengetsu

ProcedurProgramavimas_1.07

Feb 20th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     long double x1, y1, x2, y2;
  10.     cin >> x1 >> y1;
  11.     cin >> x2 >> y2;
  12.    
  13.     long double d = sqrtl((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  14.     cout << fixed << setprecision(2) << d << endl;
  15.    
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement