const n=15;
var a:array [1..n] of integer;
b:array [1..n] of real;
i:integer;
begin
write(' Исходный массив: ');
for i:=1 to n do
a[i]:=random(41)-20;
write(a[i]:5);
if a[i] mod 5 = 0 then b[i]:=a[i]*2
else b[i]:=a[i]/2
end;
writeln;
write('Преобразованный массив: ');
for i:=1 to n do write(b[i]:5);
end.
const n=15;
var a:array [1..n] of integer;
b:array [1..n] of real;
i:integer;
begin
write(' Исходный массив: ');
for i:=1 to n do
begin
a[i]:=random(41)-20;
write(a[i]:5);
if a[i] mod 5 = 0 then b[i]:=a[i]*2
else b[i]:=a[i]/2
end;
writeln;
write('Преобразованный массив: ');
for i:=1 to n do write(b[i]:5);
end.