Uses CRT; Const nmax=40; mmax=40; var a,b:array[1..nmax,1..mmax] of integer; i,j,n,m:integer; begin ClrScr; repeat write('N:='); Readln(n); until n in [1..nmax]; repeat write('M:='); Readln(m); until m in [1..mmax]; writeln('Исходный массив: '); randomize; for i:=1 to n do begin for j:=1 to m do begin a[i,j]:=random(10)-3; write(a[i,j]:5); b[i,j]:=a[i,j]*a[i,j]*a[i,j]; end; writeln; end; writeln('Результирующий массив: '); for i:=1 to n do begin for j:=1 to m do begin write(b[i,j]:5); end; writeln; end; readkey end.
CRT;
Const
nmax=40;
mmax=40;
var a,b:array[1..nmax,1..mmax] of integer;
i,j,n,m:integer;
begin
ClrScr;
repeat
write('N:=');
Readln(n);
until n in [1..nmax];
repeat
write('M:=');
Readln(m);
until m in [1..mmax];
writeln('Исходный массив: ');
randomize;
for i:=1 to n do
begin
for j:=1 to m do begin
a[i,j]:=random(10)-3;
write(a[i,j]:5);
b[i,j]:=a[i,j]*a[i,j]*a[i,j];
end;
writeln;
end;
writeln('Результирующий массив: ');
for i:=1 to n do
begin
for j:=1 to m do
begin
write(b[i,j]:5);
end;
writeln;
end;
readkey
end.