人生第一道水题 计算两点间距离

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

相关文章:

  • 2021-11-27
  • 2021-11-27
  • 2021-11-27
  • 2021-12-20
  • 2021-11-27
  • 2021-09-03
猜你喜欢
  • 2022-01-23
  • 2021-04-25
  • 2021-11-27
  • 2021-12-01
  • 2021-11-27
  • 2021-11-27
  • 2021-04-07
  • 2021-09-07
相关资源
相似解决方案