Write a program in Pascal programming language in which you need to find the hypotenuse
Write a program in Pascal programming language in which you need to find the hypotenuse of a right-angled triangle if the legs are known.
The program will be written in the PascalABC.net programming language;
Finding the hypotenuse will occur according to the Pythagorean theorem – the sum of the squares of the legs is equal to the square of the hypotenuse, so we will read the values of the legs from the keyboard and find the sum of their squares;
begin // start of the program;
var a: = readinteger; // read the value of the first leg;
var b: = readinteger; // read the value of the second leg;
var c: integer; // variable for finding the hypotenuse;
c: = sqrt (a * a + b * b); // sqrt – finding the square root;
write (c); // display the received result;
end. // end of the program;