#include <iostream>
#include <cmath>
// The Euclidean distance is a measure of the straight-line distance
// between two points in a 2D or 3D space
// Function to calculate Euclidean distance
double calculateEuclideanDistance(double x1, double y1, double x2, double y2) {
return std::sqrt(std::pow(x2 - x1, 2) + std::pow(y2 - y1, 2));
}
int main() {
double x1 = 3.0, y1 = 4.0;
double x2 = 5.0, y2 = 9.0;
double distance = calculateEuclideanDistance(x1, y1, x2, y2);
std::cout << "Euclidean Distance: " << distance << std::endl;
}
/*
run:
Euclidean Distance: 5.38516
*/