Var
a:array[1..2,1..3] of integer;
i,t,j:integer;
begin
writeln('До:');
for i:=1 to 2 do
begin
for j:=1 to 3 do
begin
a[i,j]:=random(10);
write(a[i,j],' ');
end;
writeln;
end;
for j:=1 to 3 do
begin
t:=a[1,j];
a[1,j]:=a[2,j];
a[2,j]:=t;
end;
writeln('После:');
for i:=1 to 2 do
begin
for j:=1 to 3 do
write(a[i,j],' ');
writeln;
end;end.
ПРИМЕР РАБОТЫ:
До:
5 5 2
8 6 2
После:
8 6 2
5 5 2