program ElevationAngle;
varv0, distance, angle: real;
beginwriteln('Enter the initial velocity (m/s):');readln(v0);
writeln('Enter the distance to the target (m):');readln(distance);
angle := arctan((v0 v0 + sqrt(v0 v0 v0 v0 - 9.81 (9.81 distance distance + 2 distance v0 v0))) / (9.81 * distance));
writeln('The elevation angle is ', angle * (180 / pi):0:2, ' degrees');end.
program ElevationAngle;
var
v0, distance, angle: real;
begin
writeln('Enter the initial velocity (m/s):');
readln(v0);
writeln('Enter the distance to the target (m):');
readln(distance);
angle := arctan((v0 v0 + sqrt(v0 v0 v0 v0 - 9.81 (9.81 distance distance + 2 distance v0 v0))) / (9.81 * distance));
writeln('The elevation angle is ', angle * (180 / pi):0:2, ' degrees');
end.