#include<iostream>
using namespace std;
#include<cmath>
struct point
{ double x;
double y;
};
class Quad
{ public:
Quad( int t1,int t2 )
{ a.x=t1;
a.y=t2;
}
point a;
};
double d( point &a,point &b )
{ return sqrt( pow( (a.x-b.x),2) - pow( a.y-b.y,2 ) ); }
int main()
{ double a,b,c,d,e,f,g,h;
while( cin>>a>>b>>c>>d>>e>>f>>g>>h )
{ Quad p1( a,b );
Quad p2( c,d );
Quad p3( e,f );
Quad p4( g,h );
cout<<fabs( d(p1.a,p2.a)-d(p3.a,p4.a) )<<endl;
}
}
错在哪?
蓝山帝景
哔哔one
相关分类