program calculate_hypotenuse_and_area; var A, B, C, S: real; begin writeln('Enter the length of the first cathetus:'); readln(A); writeln('Enter the length of the second cathetus:'); readln(B);
C := sqrt(A A + B B); // Calculate the hypotenuse using Pythagoras theorem S := 0.5 A B; // Calculate the area of the triangle
writeln('The length of the hypotenuse is: ', C:0:2); writeln('The area of the triangle is: ', S:0:2); end.
program calculate_hypotenuse_and_area;
var
A, B, C, S: real;
begin
writeln('Enter the length of the first cathetus:');
readln(A);
writeln('Enter the length of the second cathetus:');
readln(B);
C := sqrt(A A + B B); // Calculate the hypotenuse using Pythagoras theorem
S := 0.5 A B; // Calculate the area of the triangle
writeln('The length of the hypotenuse is: ', C:0:2);
writeln('The area of the triangle is: ', S:0:2);
end.