Untitled
unknown
plain_text
3 years ago
285 B
3
Indexable
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int y1, x1, y2, x2,x3,y3;
float d;
cin >> x1 >> y1 >> x2 >> y2;
x3 = pow(x2 - x1, 2);
y3 = pow(y2 - y1, 2);
d = sqrt(x3 + y3);
cout << fixed;
cout.precision(5);
cout << d << endl;
}
Editor is loading...