program LargestNumber;varnum, largest: integer;i, n: integer;beginlargest := 0;
write('Enter the number of elements: ');readln(n);
write('Enter ', n, ' numbers: ');for i := 1 to n dobeginreadln(num);if num > largest thenlargest := num;end;
writeln('The largest number is: ', largest);end.
program LargestNumber;
var
num, largest: integer;
i, n: integer;
begin
largest := 0;
write('Enter the number of elements: ');
readln(n);
write('Enter ', n, ' numbers: ');
for i := 1 to n do
begin
readln(num);
if num > largest then
largest := num;
end;
writeln('The largest number is: ', largest);
end.