2021/11/26
#include<stdio.h>
#include<math.h>
main()
{
float x1, y1, x2, y2;
double distance;
printf("please input the horizontal and vertical coordinates of the first point:\n");
scanf_s("%f%f", &x1, &y1);
printf("please input the horizontal and vertical coordinates of the second point:\n");
scanf_s("%f%f", &x2, &y2);
distance = pow(pow(x1 - x2, 2) + pow(y1 - y2, 2), 1.0 / 2);
printf("the distance between the two numbers is %.2lf", distance);
}