program FindMaxElement;
varA: array[1..7] of integer;i, maxElement: integer;
beginwriteln('Enter elements of the array:');for i := 1 to 7 dobeginwrite('A[', i, '] = ');readln(A[i]);end;
maxElement := A[1];for i := 2 to 7 dobeginif A[i] > maxElement thenmaxElement := A[i];end;
writeln('The maximum element in the array is: ', maxElement);
end.
program FindMaxElement;
var
A: array[1..7] of integer;
i, maxElement: integer;
begin
writeln('Enter elements of the array:');
for i := 1 to 7 do
begin
write('A[', i, '] = ');
readln(A[i]);
end;
maxElement := A[1];
for i := 2 to 7 do
begin
if A[i] > maxElement then
maxElement := A[i];
end;
writeln('The maximum element in the array is: ', maxElement);
end.