program Calculation;varx, y, b: real;beginwriteln('Enter the value of b: ');readln(b);
if b >= 5 thenbeginwriteln('Error: b should be less than 5');exit;end;
writeln('x y');x := b;while x <= 5 dobeginy := cos(x) * 3.14159 / x;writeln(x:0:1, ' ', y:0:4);x := x + 0.1;end;end.
program Calculation;
var
x, y, b: real;
begin
writeln('Enter the value of b: ');
readln(b);
if b >= 5 then
begin
writeln('Error: b should be less than 5');
exit;
end;
writeln('x y');
x := b;
while x <= 5 do
begin
y := cos(x) * 3.14159 / x;
writeln(x:0:1, ' ', y:0:4);
x := x + 0.1;
end;
end.