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]:=a[i,j]*b[i,j];
write(c[i,j]:4);
end;
end;
end.
2)var a:array[1..1000,1..1000] of integer;
i,j,k,n,u:integer;
begin;
randomize;
readln(n);
writeln('A array:');
for i:=1 to n do begin;
writeln;
for j:=1 to n do
begin;
a[i,j]:=random(10)-10;
write(a[i,j]:4);
end;
end;
for i:=1 to n do begin;
for j:=1 to n do
u+=a[i,j];
if u<0 then inc(k);<br> u:=0;
end;
writeln;
write('Result:',k);
end.