Ответ на вопрос
program TriangleAngles;var
a, b, c: real;
alpha, beta, gamma: real;
angleDegrees, angleMinutes, angleSeconds: integer;begin
writeln('Enter the lengths of the sides of the triangle:');
readln(a, b, c);// Calculate the angles using the Law of Cosines
alpha := arccos((bb + cc - aa) / (2bc));
beta := arccos((aa + cc - bb) / (2ac));
gamma := arccos((aa + bb - cc) / (2a*b));// Convert the angle alpha to degrees, minutes and seconds
angleDegrees := round(alpha 180 / pi);
angleMinutes := round((alpha 180 / pi - angleDegrees) 60);
angleSeconds := round((((alpha 180 / pi - angleDegrees) 60) - angleMinutes) 60);writeln('Angles of the triangle:');
writeln('Alpha: ', angleDegrees, ' degrees ', angleMinutes, ' minutes ', angleSeconds, ' seconds');
writeln('Beta: ', beta180/pi:0:2, ' degrees');
writeln('Gamma: ', gamma180/pi:0:2, ' degrees');
end.
Еще