.



              

- 9


repeat

eps := eps*10;

k := k + 1

until eps > 1;

t := k

end;

{---------------------------------------------------------------------------------------}

Procedure Square_root(eps, u : real; var x : real);

var

x1, x2 : real;

begin

x1 := 1;

repeat

x1 := (1/2)*(x1 + u/x1);

x2 := (1/2)*(x1 + u/x1)

until abs(x2 - x1) <= eps;

x := x2

end;

{----------------------------------------------------------------------------------------}

{ }

begin

write(' '); readln(u);

write(' '); readln(eps);

Square_root(eps, u, x);

writeln(' ', u, ' ', x:6:t(eps));

writeln(' ', eps:1:t(eps))

end.

1

1. , :

1)

3)

3. x1, x2,..., :

,

u - , n - .

.
)
, )
.

{ . . . }

Program Problem3;

uses WinCrt;

var

u, n, eps, x : real;

{----------------------------------------------------------------------------------------}

{ - - }

Function t(eps : real) : integer;

var

k : integer;

begin

k := -1;

repeat

eps := eps*10;