Дана матрица 4Х5. Найти max среди нечетных отрицательных элементов каждого столбца — Pascal(Паскаль)

Program min;
Uses crt;
 var b:array [1..100,1..100] of integer;
     a:array [1..100] of integer;
     i,j,n,max:integer;
begin
clrscr;
 Writeln (' vvedite razmernost matrici ');
 Readln (n);
  for i:=1 to n do
    for j:=1 to n do begin
                     write ('B[',i,',',j,']=');
                     Readln (b[i,j]);
                     end;
writeln (' Polychena matrica ');
for i:=1 to n do
 begin
 for j:=1 to n do
    Write ('  ',b[i,j],' ');
    writeln;
 end;
writeln;
for j:=1 to n do begin
                      max:=b[1,j];
                      for i:=2 to n do
                      if b[i,j] div 3 = 0 then
                      if b[i,j]<0 then
                      if b[i,j]>=max then max:=b[i,j];
                      a[j]:=max;
                      end;
 
Writeln (' Max elementy stolbcov ');
for j:=1 to n do
write (a[j]:4);
Readln
end.

Leave a Comment

47 − 45 =