var
FD: text;
y, step, first, last: real;
begin
write('Введите начальное значение, конечное значение и шаг:');
read(first, last, step);
assign(FD, 'tabl.txt');
rewrite(FD);
writeln(FD, 'x':4, 'f(x)':10);
while (first <= last) do
if (first.Between(0.41, 0.58)) then
writeln(FD, first:4:2, 'infinity':10)
else
y := (2 * first + 1) / (2 * first - 1);
writeln(FD, first:4:2, y:10:4);
end;
first := first + step;
close(FD);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
FD: text;
y, step, first, last: real;
begin
write('Введите начальное значение, конечное значение и шаг:');
read(first, last, step);
assign(FD, 'tabl.txt');
rewrite(FD);
writeln(FD, 'x':4, 'f(x)':10);
while (first <= last) do
begin
if (first.Between(0.41, 0.58)) then
writeln(FD, first:4:2, 'infinity':10)
else
begin
y := (2 * first + 1) / (2 * first - 1);
writeln(FD, first:4:2, y:10:4);
end;
first := first + step;
end;
close(FD);
end.