Например так: program test; uses crt; var arr:array[1..30] of integer; i,max:integer; begin randomize; for i:=1 to 30 do begin arr[i]:=random(53)+20; if (max=0) and (arr[i] mod 2 <> 0) then max:=arr[i]; write(arr[i],' '); end;
for i:=1 to 30 do if (arr[i] mod 2 <>0) and (arr[i]>max) the max:=arr[i]; writeln; writeln(max); end.
program test;
uses crt;
var
arr:array[1..30] of integer;
i,max:integer;
begin
randomize;
for i:=1 to 30 do
begin
arr[i]:=random(53)+20;
if (max=0) and (arr[i] mod 2 <> 0) then max:=arr[i];
write(arr[i],' ');
end;
for i:=1 to 30 do
if (arr[i] mod 2 <>0) and (arr[i]>max) the max:=arr[i];
writeln;
writeln(max);
end.