Program Task;
Const n = 15;
Var a: Array [1..n] of Integer;
i: Integer;
Begin
Randomize;
For i := 1 To n Do
a[i] := Random(30 - 20 + 1) + 20;
WriteLn('Массив:');
For i := 1 To n Do
Write(a[i], ' ');
WriteLn;
For i := 1 To n Do
If a[i] Mod 2 = 1 Then
a[i] := 31;
WriteLn('Результат:');
For i := 1 To n Do
Write(a[i], ' ');
ReadLn;
End.