var a: array[1..20] of integer;
i, maximal:integer;
begin
maximal := -1;
for i:=1 to 20 do begin
a[i] := random(10000);
write(a[i],' ');
if (a[i] div 1000 = 0) and (a[i] div 100 <> 0) and (a[i] mod 4 = 0) then begin
if a[i] > maximal then maximal := a[i];
end;
writeln();
if maximal = -1 then write('Не найдено')
else write(maximal);
end.
var a: array[1..20] of integer;
i, maximal:integer;
begin
maximal := -1;
for i:=1 to 20 do begin
a[i] := random(10000);
write(a[i],' ');
if (a[i] div 1000 = 0) and (a[i] div 100 <> 0) and (a[i] mod 4 = 0) then begin
if a[i] > maximal then maximal := a[i];
end;
end;
writeln();
if maximal = -1 then write('Не найдено')
else write(maximal);
end.