код:
program podprog;
type x=array[1..30,1..30]of real;
var mass:x;j,i,n,k,row,col:byte;
procedure sum(mass:x;k,row,col:byte);
var summax:real;summ:real;
procedure upor(mass:x;k:byte);
var p:real;
begin
for i:=1 to row do
begin
for j:=1 to row-i do
begin
if mass[j,k]<mass[j+1,k] then
p:=mass[j,k];
mass[j,k]:=mass[j+1,k];
mass[j+1,k]:=p;
end;
end;
end;
function poisk(mass:x;k:byte):boolean;
var i,j,row,col:byte;p:boolean;
begin
begin
for i:=1 to row do
for j:=1 to col do
begin
if mass[i,j]<0 then
begin
p:=true;
i:=row;
j:=col;
end;
end;
poisk:=p
end;
end;
begin
write('vvedite A');
readln(summax);
k:=0 ;
for j:=1 to col do
begin
for i:=1 to row do
begin
summ:=summ+mass[i,j]
end;
begin
if summax < summ then
begin
k:=j;
j:=col;
i:=row ;
end;
end;
summ:=0
end;
write(summax,' stolbec',k);
readln;
begin
if k>col/2 then
begin
upor(mass,k);
end;
end;
begin
if k<col/2 then
begin
poisk(mass,k);
end;
end;
end;
begin
write('vvedite kol-vo strok row=');
readln(row);
write('vvedite kol-vo stolbcov col=');
readln(col) ;
for i:=1 to row do
for j:=1 to col do
begin
write('vvedite element(',i,';',j,')');
readln(mass[i,j]);
end;
for i:=1 to row do
begin writeln;
for j:=1 to col do write(mass[i,j]:8:0);
writeln;
end;
readln;
writeln;
begin
sum(mass,k,row,col);
end;
end.
заранее признателен