#include <iostream> #include <cmath> double calculateEuclideanDistance(double x1, double y1, double x2, double y2) { return sqrt(pow(fabs(x2 - x1), 2) + pow(fabs(y2 - y1), 2)); } int main() { double x1 = 1.5, y1 = 3.5; double x2 = 4.5, y2 = 1.5; double distance = calculateEuclideanDistance(x1, y1, x2, y2); std::cout << "فاصله اقلیدسی بین دو نقطه برابر است با: " << distance << std::endl; return 0; }