Advertisement
DanikYakush

Task29

Jul 6th, 2022
972
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Task29 {
  2.     public static double calcQuadrilateralSquare(double x, double y, double z, double t) {
  3.         double ans = 0;
  4.         ans += x*y/2;
  5.         double c = Math.sqrt(x*x+y*y);
  6.         double p = (z+t+c)/2;
  7.         ans += Math.sqrt(p*(p-c)*(p-z)*(p-t));
  8.         return ans;
  9.     }
  10. }
Advertisement
RAW Paste Data Copied
Advertisement