Created
September 15, 2018 07:53
-
-
Save completejavascript/387106905a27e41731278df1d9bc6743 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<stdio.h> | |
#include<math.h> | |
using namespace std; | |
int main() | |
{ | |
ios::sync_with_stdio(false); | |
//freopen("input.txt", "r", stdin); | |
int T; | |
cin >> T; | |
for(int tc = 0; tc < T; tc++) | |
{ | |
double a,b,c,d; | |
cin >> a >> b >> c >> d; | |
double p = (a + b + c + d) / 2; | |
double S = sqrt((p-a)*(p-b)*(p-c)*(p-d)); | |
printf("%.2lf\n", S); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment