Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main() {
- double ax, ay, bx, by;
- cin >> ax;
- cin >> ay;
- cin >> bx;
- cin >> by;
- double x = abs(ax - bx);
- double y = abs(ay - by);
- double r1 = pow(x, 2) + pow(y, 2);
- double r = sqrt(r1);
- cout << fixed << setprecision(5) << r;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement