THE CHALLENGETriangle_area — The area of a triangle.
Read the lengths A, B and C of the three sides (one per line). If they do not form a triangle, print "Triangle invalide". Otherwise compute the area with Heron's formula:
P = (A + B + C) / 2
S = sqrt(P(P-A)(P-B)(P-C))
and print it with two decimal places.
Input:
3
4
5
Output:
6.00
Challenge: check the triangle with ONE if by combining the three conditions with and.
Checks (verified automatically before your code runs):
- Exactly 1 if/elif branch.
- At least 1 and/or operator.
- No loops at all: no for, no while, no comprehensions.