Var a,b:array[1..3,1..3] of integer; i,j:integer; begin; randomize; writeln('First matrix'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; a[i,j]:=random(9); write(a[i,j]:4); b[j,i]:=a[i,j]; end; end; writeln; writeln('Final matrix'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do write(b[i,j]:4); end; end.
i,j:integer;
begin;
randomize;
writeln('First matrix');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
a[i,j]:=random(9);
write(a[i,j]:4);
b[j,i]:=a[i,j];
end;
end;
writeln;
writeln('Final matrix');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
write(b[i,j]:4);
end;
end.