Untitled

mail@pastecode.io avatar
unknown
c_cpp
12 days ago
268 B
1
Indexable
Never
#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);
}
Leave a Comment