杭电OJ2001

#include 
#include 
#include 
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;
	}
}

 

你可能感兴趣的:(杭电OJ2001)