#include <iostream>
#include <cmath>

using namespace std;

struct Point {
    double x;
    double y;
};

double getDistance(Point a, Point b) {
    return sqrt(pow(b.x - a.x, 2) + pow(b.y - a.y, 2));
}

int main() {
    Point p1, p2;

    cin >> p1.x >> p1.y;
    cin >> p2.x >> p2.y;

    cout << "두 점 사이의 거리: " << getDistance(p1, p2) << endl;

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: