Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
On PascalABC.NET
program max_element;
var
matrix: array[0..4, 0..4] of integer;
i, j: integer;
max: integer;
begin
Randomize;
// Заполнение матрицы
for i := 0 to 4 do
begin
for j := 0 to 4 do
matrix[i][j] := Random(10, 99);
WriteLn(matrix[i]);
end;
i := 0;
j := 0;
max := matrix[i][j];
for j := 0 to 4 do
for i := j to 4 do
if max < matrix[i][j] then
max := matrix[i][j];
WriteLn(max);
end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question