View Code of Problem 24

#include<bits/stdc++.h>
using namespace std;
int main(){
	float a,b,c,k;
	while(cin>>a>>b>>c&&a!=EOF){
		
	
	k=(a+b+c)/2;
	float ans=sqrt(k*(k-a)*(k-b)*(k-c));
	printf("%.2f\n",ans);}
	return 0;
}

Double click to view unformatted code.


Back to problem 24