//Pascal ABC.NET v3.1 сборка 1172
const
n = 5;
var
ar: array[1..n] of integer;
i: integer;
begin
randomize;
writeln('First array:');
for i := 1 to n do
begin
ar[i] := random(-50, 50);
write(ar[i]:4);
if ar[i] = 0 then ar[i] := 25;
end;
writeln;
writeln('Final array:');
for i := 1 to n do
write(ar[i]:4);
end.
Пример работы:
First array:
-6 -24 0 -15 7
Final array:
-6 -24 25 -15 7