Первая

Код:
Program DZ1;
type matr=array[1..7,1..6] of real;
var a,b,c,d,e:matr;
    i,j,k:byte;
    p,max:real;
    q,s:integer;
     Procedure vivod (ch:char;M:MATR;N:byte);
      Begin
      writeln ('Matrica ',ch);
      For i:=1 to 7 do
       Begin
        For j:=1 to 6 do
         write(m[i,j]:8:n);
         writeln
       end;
      readln
      end;
     Procedure vivod1 (ch:char;M:MATR;N:byte);
      Begin
      writeln ('Matrica ',ch);
      For i:=1 to 6 do
       Begin
        For j:=1 to 6 do
         write(m[i,j]:8:n);
         writeln
       end;
      readln
      end;
Begin
For i:=1 to 7 do
 For j:=1 to 6 do a[i,j]:=sqrt(i)+j/cos(i);
vivod ('A',a,2);
max:=a[1,1];
For i:=1 to 7 do
for j:=1 to 6 do
if max<a[i,j] then
 Begin
  s:=i;
  max:=a[i,j];
 end;
writeln('Maxsimalniy element v stroke',s:2);
For i:=1 to 7 do
for j:=1 to 6 do
If s>i then b[i,j]:=a[i,j]
else b[i,j]:=a[i+1,j];
vivod1('B',b,2);
for i:=1 to 6 do
for j:=1 to 6 do c[i,j]:=0;
s:=6;
q:=0;
 for i:=1 to 6 do
 Begin
  j:=i;
  c[i,j]:=i;
  j:=abs(i-7);
  c[i,j]:=i;
 end;
vivod1('C',c,2);
 for i:=1 to 6 do
  for j:=1 to 6 do
   begin
    d[i,j]:=0;
     for k:=1 to 6 do
      d[i,j]:=d[i,j]+b[i,k]*c[k,j];
   end;
vivod1('D',d,2);
e:=d;
For i:=3 to 4 do
 For j:=3 to 4 do
  e[i,j]:=d[i,j+3];
For i:=1 to 2 do
 For j:=5 to 6 do
  e[i,j]:=d[i+2,j-2];
vivod1('E',e,2);
max:=e[1,1];
For i:=1 to 6 do
 For j:=1 to 6 do
  if max<e[i,j] then max:=e[i,j];
write('Maksimalniy element = ',max:2:2);
readln;
end.