Const nx=30; mx=30; var r:array[1..nx,1..mx] of integer;b:array[1..mx] of integer; i,j,n,m,k,sum,min:integer; begin min:=40; randomize; write('Введите n,m: ');readln(n,m); writeln('Исходная матрица: '); for j:=1 to m do begin for i:=1 to n do begin r[i,j]:=random(20)-10; sum:= sum + r[i,j];end; b[j]:=sum;sum:=0; end; for i:=1 to n do begin for j:=1 to m do begin write(r[i,j]:4);end; writeln;end; writeln; for j:=1 to m do begin write(b[j]:4); if min > b[j] then begin min:= b[j]; k:= j;end; end; writeln;writeln; for i:=1 to n do begin for j:=1 to m do begin if j=k then write(r[i,j]:4);end; writeln;end; end.
Const nx=30; mx=30; var r:array[1..nx,1..mx] of integer;b:array[1..mx] of integer; i,j,n,m,k,sum,min:integer; begin min:=40; randomize; write('Введите n,m: ');readln(n,m); writeln('Исходная матрица: '); for j:=1 to m do begin for i:=1 to n do begin r[i,j]:=random(20)-10; sum:= sum + r[i,j];end; b[j]:=sum;sum:=0; end; for i:=1 to n do begin for j:=1 to m do begin write(r[i,j]:4);end; writeln;end; writeln; for j:=1 to m do begin write(b[j]:4); if min > b[j] then begin min:= b[j]; k:= j;end; end; writeln;writeln; for i:=1 to n do begin for j:=1 to m do begin if j=k then write(r[i,j]:4);end; writeln;end; end.
var r:array[1..nx,1..mx] of integer;b:array[1..mx] of integer;
i,j,n,m,k,sum,min:integer;
begin
min:=40;
randomize;
write('Введите n,m: ');readln(n,m);
writeln('Исходная матрица: ');
for j:=1 to m do begin
for i:=1 to n do begin
r[i,j]:=random(20)-10;
sum:= sum + r[i,j];end;
b[j]:=sum;sum:=0;
end;
for i:=1 to n do begin
for j:=1 to m do begin
write(r[i,j]:4);end;
writeln;end;
writeln;
for j:=1 to m do begin
write(b[j]:4);
if min > b[j] then begin
min:= b[j]; k:= j;end;
end;
writeln;writeln;
for i:=1 to n do begin
for j:=1 to m do begin
if j=k then write(r[i,j]:4);end;
writeln;end;
end.
var r:array[1..nx,1..mx] of integer;b:array[1..mx] of integer;
i,j,n,m,k,sum,min:integer;
begin
min:=40;
randomize;
write('Введите n,m: ');readln(n,m);
writeln('Исходная матрица: ');
for j:=1 to m do begin
for i:=1 to n do begin
r[i,j]:=random(20)-10;
sum:= sum + r[i,j];end;
b[j]:=sum;sum:=0;
end;
for i:=1 to n do begin
for j:=1 to m do begin
write(r[i,j]:4);end;
writeln;end;
writeln;
for j:=1 to m do begin
write(b[j]:4);
if min > b[j] then begin
min:= b[j]; k:= j;end;
end;
writeln;writeln;
for i:=1 to n do begin
for j:=1 to m do begin
if j=k then write(r[i,j]:4);end;
writeln;end;
end.