uses crt;
f:array[1 ..10,1..10] of integer;
n,m,i,j,tmp:integer;
begin
read(m,n);
for i:=1 to n do
for j:=0 to m do begin
read(a[i,j]);
end;
for i:=1 to n do begin
tmp:=a[i,3]; a[i,3]:=a[i,n-2]; a[i,n-2]:=tmp;
write (a[i,j]:3);
writeln;
Объяснение:
uses crt;
f:array[1 ..10,1..10] of integer;
n,m,i,j,tmp:integer;
begin
read(m,n);
for i:=1 to n do
for j:=0 to m do begin
read(a[i,j]);
end;
for i:=1 to n do begin
for j:=0 to m do begin
tmp:=a[i,3]; a[i,3]:=a[i,n-2]; a[i,n-2]:=tmp;
write (a[i,j]:3);
end;
writeln;
end;
Объяснение: