1) uses crt;
var i,n,s,mx:integer;a:array[1..1000] of integer;
begin
randomize();
mx:=-100;
for i := 1 to 10 do begin
a[i] := random(100) + 1;
write(a[i],' ');
if (a[i] mod 2 = 0) and (mx < a[i])then mx := a[i];
end;
writeln('');
writeln(mx);
end.
2)
uses crt;
var i,n,s,mn1,mn2:integer;a:array[1..1000] of integer;
begin
randomize();
mn1:= 101;
mn2:= 101;
for i := 1 to 10 do begin
a[i] := random(100) + 1;
write(a[i],' ');
if (a[i] mod 2 = 1) and (mn1 > a[i])then begin
mn2 := mn1;
mn1 := a[i]
end;
end;
writeln('');
writeln(mn2);
end.