本文共 472 字,大约阅读时间需要 1 分钟。
#include #include #include #include #include #include #include #include #include using namespace std;int main(){ double a, b, x, y; while(scanf("%lf %lf %lf %lf",&a,&b,&x,&y)!=EOF) { double x1 ,x2; x1 = fabs(x - a); x2 = fabs(y - b); double ans; ans = sqrt(x1*x1 + x2*x2); printf("%.2lf\n",ans); }}
转载于:https://www.cnblogs.com/Changod/p/8169212.html