Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <math.h>
- #include <iomanip>
- using namespace std;
- long double area(double x1, double y1, double x2, double y2, double x3, double y3)
- {
- return fabs(x1 * y2 + x3 * y1 + x2 * y3 - x3 * y2 - x1 * y3 - x2 * y1);
- }
- int main()
- {
- long double PI = 3.141592653589793;
- double x1, y1, x2, y2, x3, y3;
- while(cin>>x1>>y1>>x2>>y2>>x3>>y3)
- {
- cout<<setprecision(2)<<fixed<<hypot(x1-x2, y1-y2) * hypot(x2-x3, y2-y3) * hypot(x1-x3, y1-y3) * PI / area(x1, y1, x2, y2, x3, y3)<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement