const n = 20;
var i, max :integer;
A: array[1..n] of integer;
begin
max := 0;
write('Массив A: ');
for i := 1 to n do
A[i] := random(0, 10);
write(A[i], ' ');
if A[i] > max then max := A[i];
end;
writeln();
writeln('Максимальный элемент: ', max);
write('Массив с заменами: ');
if A[i] = 0 then A[i] := 30;
end.
const n = 20;
var i, max :integer;
A: array[1..n] of integer;
begin
max := 0;
write('Массив A: ');
for i := 1 to n do
begin
A[i] := random(0, 10);
write(A[i], ' ');
if A[i] > max then max := A[i];
end;
writeln();
writeln('Максимальный элемент: ', max);
write('Массив с заменами: ');
for i := 1 to n do
begin
if A[i] = 0 then A[i] := 30;
write(A[i], ' ');
end;
end.