.


           

A,


, A, , .
5, , , 2

, .
7. , ,
2.
Program Problem7;
uses
WinCrt;
var
i, n, k : longint;
eps, yn, yp : real;
{----------------------------------------------------------------------------------------}
{ - - }
Function t(eps : real) : integer;
var
k : integer;
begin
k := -1;
repeat
eps := eps*10;
k := k + 1
until
eps > 1;
t := k
end;
{----------------------------------------------------------------------------------------}
{ }
begin
writeln(' , ');
write(' '); readln(eps);
i := 1; k := -1; yn := 1;
while
abs(yn - 2) >= eps do
begin
i := i + 1; k := k*(-1);
yn := 2 + k/i
end;
writeln(' abs(yn-2)<', eps:1:t(eps), ' ');
writeln(' yn = ', yn:6:t(eps), ',');
writeln(' ', i); writeln;
write(' ',i,' ');
readln(n);
if
n mod 2 = 0 then yn := 2 + 1/n else yn := 2 - 1/n;
if
abs(2 - yn) < eps
then
begin
write(' abs(2 - ', yn:6:t(eps), ') < ', eps:1:t(eps));
writeln( ' ')
end
else
begin