//Pascal ABC.Net 3.0
1)var ma:array[1..20,1..10] of integer;
max,i,j,maxj:integer;
begin;
randomize;
max:=-2147483648;
writeln('Matrix:');
for i:=1 to 20 do
begin;
writeln;
for j:=1 to 10 do
begin;
ma[i,j]:=random(100);
write(ma[i,j]:4);
if (i=2) and (ma[i,j]>max) then
begin;
max:=ma[i,j];
maxj:=j;
end;
end;
end;
writeln;
writeln('Max:',max,' в столбце:',maxj);
end.
2)var ma:array[1..10,1..10] of integer;
i,j,c:integer;
begin;
randomize;
writeln('Matrix:');
for i:=1 to 10 do
begin;
writeln;
for j:=1 to 10 do
begin;
ma[i,j]:=random(100);
write(ma[i,j]:4);
end;
end;
c:=ma[1,1];
ma[1,1]:=ma[10,10];
ma[10,10]:=c;
writeln;
writeln('Final matrix:');
for i:=1 to 10 do
begin;
writeln;
for j:=1 to 10 do
write(ma[i,j]:4);
end;
end.
3)var ma:array[1..10,1..10] of integer;
ar:array[1..10] of integer;
i,j,c:integer;
begin;
randomize;
writeln('Matrix:');
for i:=1 to 10 do
ar[i]:=1;
for i:=1 to 10 do
begin;
writeln;
for j:=1 to 10 do
begin;
ma[i,j]:=random(10)+1;
write(ma[i,j]:4);
ar[j]:=ar[j]*ma[i,j];
end;
end;
writeln;
writeln('Результат:');
for i:=1 to 10 dowriteln('Произведение столбца ',i,'=',ar[i]);
end.