Вот моя программа:
const
sizerow = 10;
sizecol = 10;
type
trow = array[1 .. sizerow] of integer;
tmatrix = array[1 .. sizecol] of trow;
var
mx: tmatrix;
i, j: integer;
procedure swapcols(var mx: tmatrix; const i, j: integer);
var T: trow;
begin
T := mx[i]; mx[i] := mx[j]; mx[j] := T
end;
procedure print(var mx: tmatrix);
var i, j: integer;
begin
for i := 1 to sizerow do begin
for j := 1 to sizecol do
write(mx[j][i]:4);
writeln
end;
end;
procedure print1;
var i, j: integer;
begin
for i := 1 to sizerow do begin
for j := 1 to sizecol do
write(mx[j][i]:4);
writeln
end;
end;
procedure print2(mx: tmatrix);
var i, j: integer;
begin
for i := 1 to sizerow do begin
for j := 1 to sizecol do
write(mx[j][i]:4);
writeln
end;
end;
begin
for i := 1 to sizerow do
for j := 1 to sizecol do
mx[i][j] := random(100);
writeln('before:'); print(mx);
swapcols(mx, 1, 5);
writeln('after:'); print(mx);
writeln('bez parametrov:');print1;
writeln('Parametru znachenia:'); print2(mx);
end.