#P5708. Triangle Area Calculation
Triangle Area Calculation
Triangle Area Calculation
Given a triangle with sides (a), (b), and (c), the area is given by Heron's formula:
[
\text{Area} = \sqrt{p(p-a)(p-b)(p-c)}]
where (p = \frac{1}{2}(a+b+c)).
Input the three side lengths and compute the area of the triangle. The result should be rounded to one decimal place using standard rounding rules.
inputFormat
The input consists of three space-separated floating-point numbers representing the side lengths (a), (b), and (c) of the triangle. Ensure that these values can form a valid triangle.
outputFormat
Output a single floating-point number representing the area of the triangle, rounded to one decimal place.
sample
3 4 5
6.0