.


- 2


var

x : real;

begin

x := 0;

repeat

x := x + 0.0001

until

FF(x) >= PP;

n := trunc(sqr(x/(2*e)))

end;

 

{ - }

Program Problem6;

uses WinCrt;

var

n : longint; e, pp : real;

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

{ }

{ 0 x. - }

Function

FF(x : real) : real;

var

n : integer; u, I : real;

begin

if x >= 5

then FF := 1

else if x <= -5

then FF := -1

else

begin

u := x; n := 0; I := 0;

repeat

I := I + u; n := n + 1;

u := -u*(x*x*(2*n - 1)/(2*n*(2*n + 1)))

until abs(u) < 0.00001;

FF := 2*I/sqrt(2*Pi)

end

end;

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

{ - }

{ 蠠 }

Procedure

NumberExperiment(e, PP : real; var n : longint);

var

x : real;

begin

n := 0;

repeat

n := n + 1;

x := 2*e*sqrt(n)

until FF(x) >= PP

end;

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

{ }

begin

write(' '); readln(PP);

write(' '); readln(e);

NumberExperiment(e, PP, n);

writeln(' ', n );

writeln(' ', e:1:8)

end.




- -  - -  - -