#P2321. Triangle Area via Heron's Formula
Triangle Area via Heron's Formula
Triangle Area via Heron's Formula
You are given three positive numbers representing the sides of a triangle. Your task is to calculate the area of the triangle using Heron's formula.
The area A is calculated as:
$$A = \sqrt{s(s-a)(s-b)(s-c)}$$
where the semi-perimeter s is defined as:
$$s = \frac{a+b+c}{2}$$
You can assume that the given sides always form a valid triangle.
inputFormat
The input consists of a single line containing three space-separated positive numbers a, b and c which denote the lengths of the sides of the triangle.
outputFormat
Output the area of the triangle. The answer should be printed rounded to three decimal places.
sample
3 4 5
6.000