Given three positive numbers a, b, c. Check if they will be the sides of a triangle.

Given three positive numbers a, b, c. Check if they will be the sides of a triangle. If yes, then calculate the area of this triangle. Pascal

If the sum of any two sides is greater than the third, then such a triangle is possible. Heron’s formula was used to determine the area.

var a, b, c, p: real;
begin
writeln (‘Entering the side of a triangle through a space’);
readln (a, b, c);
if ((a + b <c) or (a + c <b) or (b + c <a))
then writeln (‘A triangle cannot have sides’, a, ”, b, ”, c)
else
begin
p: = (a + b + c) / 2;
writeln (‘Area of a triangle:’, sqrt (p * (p – a) * (p – b) * (p – c)): 2);
end
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.