Created
June 10, 2019 17:36
-
-
Save sofhiasouza/059fadd3a03004f822673230163af381 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
struct ponto | |
{ | |
int x, y; | |
double dist(ponto q) | |
{ | |
int r1 = x - q.x; | |
int r2 = y - q.y; | |
return sqrt(r1*r1 + r2*r2); | |
} | |
}; | |
int main() | |
{ | |
ponto a, b; | |
cin >> a.x >> a.y >> b.x >> b.y; | |
cout << a.dist(b) << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment