Const
n=9;
var
i:integer;
m:array[1..n] of integer;
begin
Randomize;
for i:=1 to n do
begin m[i]:=Random(27)+21; Write(m[i],' ') end;
Writeln;
for i:=1 to n do begin
if m[i] mod 5=0 then m[i]:=m[i]-3; Write(m[i],' ')
end;
Writeln
end.
Пример работы программы
34 30 40 28 30 47 23 41 30
34 27 37 28 27 47 23 41 27