Var m,n: byte; a: array[1..100,1..100] of integer; procedure form; var i,j: byte; begin randomize; for i: =1 to n do for j: =1 to m do a[i,j]: =random(280)-120; end; procedure viv; var i,j: byte; begin for i: =1 to n do begin writeln; for j: =1 to m do write(a[i,j]: 5); end; end; procedure saj; var i,j,k,b: integer; begin writeln; writeln; for b: =1 to n do for i: =1 to n do for j: =1 to m-1 do if a[i,j] k: =a[i,j]; a[i,j]: =a[i,j+1]; a[i,j+1]: =k; end; for b: =1 to n do for i: =2 to n do for j: =1 to m-1 do if a[i,j] k: =a[i,j]; a[i,j]: =a[i,j+1]; a[i,j+1]: =k; end; for b: =1 to n do for i: =3 to n do for j: =1 to m-1 do if a[i,j] k: =a[i,j]; a[i,j]: =a[i,j+1]; a[i,j+1]: =k; end; for b: =1 to n do for i: =4 to n do for j: =1 to m-1 do if a[i,j] k: =a[i,j]; a[i,j]: =a[i,j+1]; a[i,j+1]: =k; end; for b: =1 to n do for i: =5 to n do for j: =1 to m-1 do if a[i,j] k: =a[i,j]; a[i,j]: =a[i,j+1]; a[i,j+1]: =k; end; for i: =1 to n do begin for j: =1 to m do write(a[i,j]: 5); writeln; end; end; begin readln(n,m); form; viv; saj; readln end. записать в файл исходную и преобразованную матрицы! как это сделать не могу понять?
const n=100;
var ar:array of array of integer;
ars:array of array of string;
i:integer;
procedure complection(var ar:array of array of integer;var ars:array of array of string);
var
i,j:integer;
begin;
for i:=1 to n do
begin;
for j:=1 to n do
begin;
ar[i,j]:=random(9);
str(ar[i,j],ars[i,j]);
end;
end;
end;
procedure burning(ars:array of array of string);
var
i,j:integer;
t:text;
begin;
assign(t,'text.txt');
rewrite(t);
for i:=1 to n do
begin;
writeln(t,' ');
for j:=1 to n do
write(t,ars[i,j],' ');
end;
end;
begin;
randomize;
setlength(ar,n+1);
setlength(ars,n+1);
for i:=1 to n do
begin;
setlength(ar[i],n+1);
setlength(ars[i],n+1);
end;
complection(ar,ars);
burning(ars);
end.