Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     cout.precision();
  6.     cout.setf(ios::fixed);
  7.     long long a,b,c,d,e,f;
  8.     cin>>a>>b>>c>>d>>e>>f;
  9.     long double ab=sqrt((a-c)*(a-c)+(b-d)*(b-d));
  10.     long double ac=sqrt((a-e)*(a-e)+(b-f)*(b-f));
  11.     long double bc=sqrt((c-e)*(c-e)+(d-f)*(d-f));
  12.     cout<<fixed<<setprecision(7)<<(double)(bc*a+ac*c+ab*e)/(ab+bc+ac)<<" "<<(double)(bc*b+ac*d+ab*f)/(ab+bc+ac);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement