Advertisement
Artem771577

KR

Nov 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6.  
  7. double distance_from_x_to_y(double u, double v, double w, double z)
  8. {
  9.  
  10. return sqrt(pow((abs(u - w)), 2) + pow((abs(v - z)), 2));
  11.  
  12. }
  13. int main()
  14. {
  15. double u, v, w, z;
  16. cin >> u >> v >> w >> z ;
  17. cout << endl;
  18. cout<< distance_from_x_to_y(u, v, w, z);
  19.  
  20.  
  21.  
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement