计算两点间的距离
Total Submission(s): 190340 Accepted Submission(s): 66435
0 0 0 1 0 1 1 0
1.00 1.41
#include<stdio.h>
#include<math.h>
main()
{
float d,x1, y1, x2, y2;
while (scanf("%f%f%f%f", &x1, &y1, &x2, &y2) != EOF)
{
d = sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));
printf("%.2f\n", d);
}
}
8904



被折叠的 条评论
为什么被折叠?



