#include <math.h> // point A(x1, y1) // point B(x2, y2) double distance = sqrt((x2-x1)^2 + (y2-y1)^2);