Program matr;
Uses crt;
const
max=10;
Var
i,j,n,m,x,k:integer;
a:array [1..max,1..max] of integer;
b:array [1..max,1..max] of integer;
candidat:integer;
sum:real;
Begin
ClrScr;
Textcolor(6);
Writeln('predupregdenir');
repeat
textcolor(2);
writeln('vvod');
readln(n);
writeln ('vvod');
readln(m);
if (n<0) or (m<0) or (m>max )then
writeln('vi vveli ne dopustimie zna4enija')
until (n>0) and (n<max) and (m>0) and (m<max);
writeln('‚ў®¤ ¬ ваЁжл');
for i:=1 to n do
for j:=1 to m do
begin
write ('elementi ',i,' н«Ґ¬Ґв ',j,'stolbca:');
readln(a[i,j]);
end;
writeln('isxodnaya');
for i:=1 to n do
begin
for j:=1 to m do
write(a[i,j]:3);
writeln;
end;
for i:=1 to n do
b[j,1]:=a[i,m];
for i:=1 to n-1 do
for j:=1 to n do
if b[j,m]<b[j,1] then begin
k:=b[j,1];
b[j,1]:=b[j,m];
b[j,m]:=k
end;
for j:= 1 to n do
begin
if a[j,m]<>b[j,1] then
begin
for j:=1 to n do
if a[j,m]=b[j,1] then b[j,2]:=j
end
else b[j,2]:=j;
end;
writeln('®вб®авЁа®ў п ¬ ваЁж ');
for i:=1 to n do
begin
for j:=1 to m do
write(a[i,j]:3);
writeln;
end;
K:=0;
for i:=1 to n do
k:=k+a[i,j];
sum:=k/n;
write('б।ҐҐ аЁд¬.=',sum:0:3);
repeat until keypressed;
end.
Сообщение отредактировано: lsdy -