.


           

. . . .


abs(u) < 0.00001;

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

end

end;

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

{ . . . . . [m1; m2] }

Procedure

Interval(n, m1, m2 : longint; p : real; var PP : real);

var

x1, x2 : real;

begin

x1 := (m1 - n*p)/sqrt(n*p*(1 - p));

x2 := (m2 - n*p)/sqrt(n*p*(1 - p));

PP := (FF(x2) - FF(x1))/2

end;

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

{ . }

begin

write(' '); readln(n);

write(' ');

readln(p);

write(' '); readln(m1);

write(' '); readln(m2);

Interval(n, m1, m2, p, PP);

writeln(' , ');

write(' [',m1, '; ', m2, '] ');

writeln(PP:1:8)

end.

{ - }

Program Problem2;

uses WinCrt;

var

n, m1, m2 : longint;

p, q, 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;