杭电2001 计算两点之间的距离

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2001

注意输入时候的空格就可以了

#include<stdio.h>
#include<math.h>
int main()
{
	double x1,x2,y1,y2;
	while(scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2)!=EOF)
	{
		getchar();
		printf("%.2f
",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));

	}
}

  

原文地址:https://www.cnblogs.com/wuyuewoniu/p/4079734.html