Как вывести индекс массива в данной задаче?


program gdiagle ;

uses crt;
var
i,j,max:integer;
a:array[1..5,1..10] of integer;
s:array[1..10] of integer;
begin
for i:=1 to 5 do
begin
for j:=1 to 10 do
begin
a[i,j]:=random(50);
write (a[i,j],' ' )
end;
writeln
end;
writeln ('');
for i:=1 to 5 do
begin
for j:=1 to 10 do
begin
if j=i then
begin
if max<a[i,j] then
max:=a[i,j];
end;
end;
end;
writeln('Максимум: ', max);
end.

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.