ans

zhaojiaqi 2024-01-22 21:50:13 2024-03-30 18:56:26 1 返回题目

#include <bits/stdc++.h>

using namespace std;

double sqr(double x) {

return x * x;

} double line(double xa,double ya, double xb,double yb) {

double a = sqr(xa - xb);

double b = sqr(ya - yb);

return sqrt(a + b);

} int main() {

double xa,ya, xb, yb;

cin >> xa >> ya;

cin >> xb >> yb;

double len = line(xa, ya, xb, yb);

cout << fixed << setprecision(3) << len;

return 0;

}

{{ vote && vote.total.up }}