#include <stdio.h> #include <math.h> int main() { float a,b,c,d,s; while (scanf("%f%f%f",&a,&b,&c)!=EOF) { d=(a+b+c)/2; s=sqrt(d*(d-a)*(d-b)*(d-c)); printf("%.2f\n",s); } }
Double click to view unformatted code.