Uses crt; const n=5; m=5; var a:array[1..n,1..m] of integer; i,j,max,t:integer; begin for i:=1 to n do begin for j:=1 to m do read(a[i,j]); end; t:=1; writeln; repeat max:=a[t,1]; for i:=t to t do for j:=1 to m do if a[i,j]>max then max:=a[i,j]; writeln(max); inc(t); until t>n end.
var a: array [1..10,1..10] of integer; i,j,max: integer;
begin for i:= 1 to n do begin for j:= 1 to n do begin a[i,j]:= random(10); // заполнение массива случайными числами write(a[i,j],' ') end; writeln end; for i:= 1 to n do begin max:= a[i,1]; for j:= 1 to n do if a[i,j]>max then max:= a[i,j]; writeln('максимум ',i,' строки',' =',max) end end.
const n=5;
m=5;
var a:array[1..n,1..m] of integer;
i,j,max,t:integer;
begin
for i:=1 to n do
begin
for j:=1 to m do
read(a[i,j]);
end;
t:=1;
writeln;
repeat
max:=a[t,1];
for i:=t to t do
for j:=1 to m do
if a[i,j]>max then max:=a[i,j];
writeln(max);
inc(t);
until t>n
end.
n= 5;
var
a: array [1..10,1..10] of integer;
i,j,max: integer;
begin
for i:= 1 to n do begin
for j:= 1 to n do begin
a[i,j]:= random(10); // заполнение массива случайными числами
write(a[i,j],' ')
end;
writeln
end;
for i:= 1 to n do begin
max:= a[i,1];
for j:= 1 to n do
if a[i,j]>max then max:= a[i,j];
writeln('максимум ',i,' строки',' =',max)
end
end.