View Code of Problem 24

#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
	double a,b,c;
	double s;

	while(scanf("%lf %lf %lf",&a,&b,&c)!=EOF){
	
	s=(a+b+c)/2;
	printf("%0.2lf\n",sqrt(s*(s-a)*(s-b)*(s-c)));
	}
	
} 

Double click to view unformatted code.


Back to problem 24