Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <cmath>
- using namespace std;
- double distance_from_x_to_y(double u, double v, double w, double z)
- {
- return sqrt(pow((abs(u - w)), 2) + pow((abs(v - z)), 2));
- }
- int main()
- {
- double u, v, w, z;
- cin >> u >> v >> w >> z ;
- cout << endl;
- cout<< distance_from_x_to_y(u, v, w, z);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement