var a: array[1..15] of integer;
i,m: integer;
begin
writeln('массив:');
for i:=1 to 15 do
a[i]:=random(61)+20;
write(a[i],' ');
end;
m:=-1;
writeln;
if ((a[i] mod 10=2) or (a[i] mod 10=8)) and (a[i]>m) then m:=a[i];
if m=-1 then write('такого элемента нет') else writeln('m=',m);
end.
var a: array[1..15] of integer;
i,m: integer;
begin
writeln('массив:');
for i:=1 to 15 do
begin
a[i]:=random(61)+20;
write(a[i],' ');
end;
m:=-1;
writeln;
for i:=1 to 15 do
if ((a[i] mod 10=2) or (a[i] mod 10=8)) and (a[i]>m) then m:=a[i];
if m=-1 then write('такого элемента нет') else writeln('m=',m);
end.