// The Euclidean distance is a measure of the straight-line distance
// between two points in a 2D or 3D space
using System;
class EuclideanDistance
{
// Function to calculate Euclidean distance
static double CalculateEuclideanDistance(double x1, double y1, double x2, double y2) {
return Math.Sqrt(Math.Pow(x2 - x1, 2) + Math.Pow(y2 - y1, 2));
}
static void Main()
{
double x1 = 3.0, y1 = 4.0;
double x2 = 5.0, y2 = 9.0;
double distance = CalculateEuclideanDistance(x1, y1, x2, y2);
Console.WriteLine($"Euclidean Distance: {distance:F5}");
}
}
/*
run:
Euclidean Distance: 5.38516
*/