program MaxNumberEndingInThree;
varn, i, maxNumber: integer;
beginmaxNumber := -1;
write('Enter the number of elements: ');readln(n);
for i := 1 to n dobeginwrite('Enter number ', i, ': ');readln(num);
end;
if maxNumber = -1 thenwriteln('There are no numbers ending with 3.')elsewriteln('The maximum number ending in 3 is: ', maxNumber);
end.
program MaxNumberEndingInThree;
var
n, i, maxNumber: integer;
begin
maxNumber := -1;
write('Enter the number of elements: ');
readln(n);
for i := 1 to n do
if (num > maxNumber) and (num mod 10 = 3) thenbegin
write('Enter number ', i, ': ');
readln(num);
maxNumber := num;
end;
if maxNumber = -1 then
writeln('There are no numbers ending with 3.')
else
writeln('The maximum number ending in 3 is: ', maxNumber);
end.