Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Task29 {
- public static double calcQuadrilateralSquare(double x, double y, double z, double t) {
- double ans = 0;
- ans += x*y/2;
- double c = Math.sqrt(x*x+y*y);
- double p = (z+t+c)/2;
- ans += Math.sqrt(p*(p-c)*(p-z)*(p-t));
- return ans;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement