杭电OJ2001

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
	double x1, x2, y1, y2;
	double s;
	while (cin >> x1 >>y1>>x2>> y2)
	{
		double m,n;
		m = pow((x1 - x2), 2);
		n = pow((y1 - y2), 2);
		s = sqrt(m + n);
		cout << setprecision(2) << fixed << s << endl;
	}
}

猜你喜欢

转载自blog.csdn.net/weixin_42265486/article/details/83501616