.


- 3


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

{ }

Function func(x : real) : real;

begin

func := x*x*x*x - 14*x*x*x + 60*x*x - 70*x

end;

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

{ }

Function fib(n : integer) : real;

var

f, f1, f2 : real; i: integer;

begin

f1 := 1; f := 0;

for i := 1 to n do

begin

f2 := f1;

f1 := f;

f := f1 + f2

end;

fib := f

end;

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

{ }

begin

write(' '); readln(a);

aa := a;

write(' '); readln(b);

bb := b;

write(' '); readln(n);

x2 := a + (b - a)*fib(n-1)/fib(n); y2 := func(x2);

for i := 1 to n do

begin

x1 := a + b - x2; y1 := func(x1);

if (x2 > x1) and (y2 > y1)

then

begin

b := x2; x2 := x1; y2 := y1; goto 1

end;

if (x2 <= x1) and (y2 > y1)

then

begin

a := x2; x2 := x1; y2 := y1; goto 1

end;

if (x2 > x1) and (y2 < y1)

then

begin

a := x1; goto 1

end;

if (x2 <= x1) and (y2 <= y1)

then

begin

b := x1; goto 1

end;

1: end;

x := (a + b)/2;

write('.