Const n=15; var a,s:array [1..100] of integer; i,j:integer; begin for i:=1 to n do begin a[i]:=random(15); write(a[i],' '); end; j:=1; writeln; writeln('Полученный массив'); for i:=1 to n do begin if (a[i] mod 2 = 0) and (a[i]>0) then begin inc(j); s[j]:=a[i]; write(s[j],' '); end; end;
var a,s:array [1..100] of integer;
i,j:integer;
begin
for i:=1 to n do begin
a[i]:=random(15);
write(a[i],' ');
end;
j:=1;
writeln;
writeln('Полученный массив');
for i:=1 to n do begin
if (a[i] mod 2 = 0) and (a[i]>0) then begin
inc(j);
s[j]:=a[i];
write(s[j],' ');
end;
end;