Var ar:array[1..n] of integer; ar2:array[1..n] of integer; i,k:integer;
function prost(a:integer):boolean; var i:integer; b:boolean; begin b:=true; for i:=2 to a div 2 do if a mod i=0 then begin; b:=false; break; end; if a=1 then b:=false; prost:=b; end;
begin; randomize; k:=0; for i:=1 to n do begin; ar[i]:=random(101); write(ar[i]:4); end; writeln; for i:=1 to n do if prost(ar[i]) then begin; inc(k); ar2[k]:=ar[i]; write(ar2[k]:4); end; end.
program we;
const
е=0.01;
ro=0.57;
ty=280;
tz=320;
py=180;
p_kr=4.695;
t_kr=190.55;
n=8;
m=21;
type sm=array [1..8] of real;
const x_i: sm=(0.841,0.023,0.069,0.009,0.019,0.014,0.013,0.012);
t_i: sm=(190.55,305.43,369.82,425.16,408.13,469.65,460.39,507.35);
p_i: sm=(46.95,49.76,44.33,38.71,37.19,34.35,34.48,30.72);
var sa,sb: real; i: integer;
a_sm, b_sm,ppkr,tpkr: sm;
p_2,p1,p_sr,p_pr,t_sr,t_pr,pz,dp,t_x,t_pl,g,dt,h,p2,pl,p_x,s,c_r,b,c,a,c_st,f_a,f_b,f_c,z_sr,z,x1,l,sppkr,stpkr: real;
function fz(x1: real): real;
begin
fz: =exp(ln(x1)*3)-sqr(x1)+x1*p_sr*(sqr(sb)*p_sr+sa-sb)-sa*sb*sqr(p_sr);
end;
begin
sa: =0;
sb: =0;
sppkr: =0;
stpkr: =0;
for i: =1 to 8 do
begin
a_sm[i]: =((0.0867*t_i[i])/(p_i[i]*t_sr))*x_i[i];
b_sm[i]: =((0.4278*sqr(t_i[i])*sqrt(/(p_i[i]*sqr(t_sr)*sqrt(*x_i[i];
ppkr[i]: =(p_i[i]*x_i[i]);
tpkr[i]: =(t_i[i]*x_i[i]);
sa: =sa+a_sm[i];
sb: =sb+b_sm[i];
sppkr: =sppkr+ppkr[i];
stpkr: =stpkr+tpkr[i];
end;
l: =0;
for i: =1 to m do
begin
p_2: = py;
t_sr: =(ty+tz)/2;
repeat;
p1: = p_2;
p_sr: =(p1+p_2)/2;
p_pr: =p1/sppkr;
t_pr: =t_sr/stpkr;
a: =0;
b: =1;
repeat
f_a: =fz(a);
f_b: =fz(b);
c: =(a+b)/2;
f_c: =fz(c);
if(f_c*f_a)< 0 then b: =c
else a: =c;
c_st: =(a+b)/2;
until (abs(c_st-c)) z_sr: =c;
s: =0.03415*(ro*l)/(z_sr*t_sr);
pz: =py*exp(s);
p_2: = pz*exp(s);
dp: =pz-p1;
p_2: =pz;
until dp l: =l+100;
writeln ('l=', l, ' p=', p_2, ' z=', z_sr );
end;
end.
n=5;
Var
ar:array[1..n] of integer;
ar2:array[1..n] of integer;
i,k:integer;
function prost(a:integer):boolean;
var i:integer;
b:boolean;
begin
b:=true;
for i:=2 to a div 2 do
if a mod i=0 then
begin;
b:=false;
break;
end;
if a=1 then b:=false;
prost:=b;
end;
begin;
randomize;
k:=0;
for i:=1 to n do
begin;
ar[i]:=random(101);
write(ar[i]:4);
end;
writeln;
for i:=1 to n do
if prost(ar[i]) then
begin;
inc(k);
ar2[k]:=ar[i];
write(ar2[k]:4);
end;
end.