program TriangleArea; var AB, BC, CA, p, S: real; begin write('Enter the length of side AB: '); readln(AB); write('Enter the length of side BC: '); readln(BC); write('Enter the length of side CA: '); readln(CA);
p := (AB + BC + CA) / 2; S := sqrt(p (p - AB) (p - BC) * (p - CA));
writeln('The area of the triangle is: ', S:0:2); end.
program TriangleArea;
var
AB, BC, CA, p, S: real;
begin
write('Enter the length of side AB: ');
readln(AB);
write('Enter the length of side BC: ');
readln(BC);
write('Enter the length of side CA: ');
readln(CA);
p := (AB + BC + CA) / 2;
S := sqrt(p (p - AB) (p - BC) * (p - CA));
writeln('The area of the triangle is: ', S:0:2);
end.