Untitled
unknown
c_cpp
2 years ago
268 B
8
Indexable
#include <iostream>
#include <cmath>
using namespace std;
float distance(float x, float y, float x1, float y1)
{
return sqrt(pow(x1 - x, 2) + pow(y1-y, 2));
}
int main()
{
float x, y, x1, y1;
cin >> x >> y >> x1 >> y1;
cout << distance(x, y, x1, y1);
}Editor is loading...
Leave a Comment