Skip to content

Instantly share code, notes, and snippets.

@modos
Created October 12, 2022 03:35
Show Gist options
  • Save modos/1b794052595e2b4a5815b5cd05f16c6b to your computer and use it in GitHub Desktop.
Save modos/1b794052595e2b4a5815b5cd05f16c6b to your computer and use it in GitHub Desktop.
کاغذ کادو چهارضلعی
#include <iostream>
#include <math.h>
#include <string>
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
long double a, b, c, d;
cin >> a >> b >> c >> d;
long double s = (a + b + c + d)/2;
cout << setprecision(12) << sqrt((s-a)*(s-b)*(s-c)*(s-d));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment