var side1, side2, side3: real; maxSide, sumOfSquares: real;
begin writeln('Enter the three sides of the triangle:'); readln(side1, side2, side3);
// Найдем самую длинную сторону if (side1 > side2) and (side1 > side3) then maxSide := side1 else if (side2 > side1) and (side2 > side3) then maxSide := side2 else maxSide := side3;
// Проверим условие прямоугольности треугольника if maxSide = side1 then sumOfSquares := sqr(side2) + sqr(side3) else if maxSide = side2 then sumOfSquares := sqr(side1) + sqr(side3) else sumOfSquares := sqr(side1) + sqr(side2);
if sqr(maxSide) = sumOfSquares then writeln('The triangle is right-angled.') else writeln('The triangle is not right-angled.');
program CheckRightTriangle;
var
side1, side2, side3: real;
maxSide, sumOfSquares: real;
begin
writeln('Enter the three sides of the triangle:');
readln(side1, side2, side3);
// Найдем самую длинную сторону
if (side1 > side2) and (side1 > side3) then
maxSide := side1
else if (side2 > side1) and (side2 > side3) then
maxSide := side2
else
maxSide := side3;
// Проверим условие прямоугольности треугольника
if maxSide = side1 then
sumOfSquares := sqr(side2) + sqr(side3)
else if maxSide = side2 then
sumOfSquares := sqr(side1) + sqr(side3)
else
sumOfSquares := sqr(side1) + sqr(side2);
if sqr(maxSide) = sumOfSquares then
writeln('The triangle is right-angled.')
else
writeln('The triangle is not right-angled.');
end.