#include <iostream> #include <sstream> #include <stdio.h> #include <string> #include <math.h> #include <algorithm> #include <stdlib.h> #include <stack> #include <map> #include <set> #include <queue> using namespace std; int main() { int a,b,c; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { float p=(a+b+c)/2.0; float ans=sqrt(p*(p-a)*(p-b)*(p-c)); printf("%.2f",ans); } return 0; } |
Double click to view unformatted code.