1)var a:array[1..3,1..3] of integer;
b:array[1..3,1..3] of integer;
c:array[1..3,1..3] of integer;
i,j:integer;
begin;
writeln('A array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
a[i,j]:=random(-10,10);
write(a[i,j]:4);
end;
end;
writeln;
writeln('B array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
b[i,j]:=random(-10,10);
write(b[i,j]:4);
end;
end;
writeln;
writeln('C array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
c[i,j]:=b[i,j]-a[i,j];
write(c[i,j]:4);
end;
end;
end.
2)var a:array of array of real;
i,j,n,m:integer;
max:real;
begin;
randomize;
max:=-2147483648;
readln(n);
readln(m);
setlength(a,n+1);
for i:=1 to n do
setlength(a[i],m+1);
writeln('A array:');
for i:=1 to n do
begin;
writeln;
for j:=1 to m do
begin;
a[i,j]:=random(-10,10);
if max write(a[i,j]:4);
end;
end;
for i:=1 to n do
for j:=1 to m do
if a[i,j]<0 then a[i,j]:=max;<br>writeln;
writeln('Final array:');
for i:=1 to n do
begin;
writeln;
for j:=1 to m do
write(a[i,j]:4);
end;
end.