Calculate the hypotenuse of a right-angled triangle if its legs are known. program in Pascal

program zz1;
var a, b: integer; // set variables of integer type
c: real; // set variables of non-integer type

begin
write (‘enter the first leg of a right triangle a’); // enter the first number from the keyboard
read (a);
write (‘enter the second leg of the right triangle b’); // enter the second number from the keyboard
read (b);
c: = sqrt (sqr (a) + sqr (b)); // calculate the hypotenuse of a right triangle using the Pythagorean theorem
write (‘Hypotenuse of right triangle =’, c); // display the answer
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.