program FindMaxNumber;
vari, number, maxNumber: integer;hasNumberEndingWith4: boolean;
beginhasNumberEndingWith4 := false;maxNumber := 0;
for i := 1 to 10 dobeginwrite('Enter a natural number: ');readln(number);
end;
if hasNumberEndingWith4 thenwriteln('The maximum number ending with 4 is: ', maxNumber)elsewriteln('NO');end.
program FindMaxNumber;
var
i, number, maxNumber: integer;
hasNumberEndingWith4: boolean;
begin
hasNumberEndingWith4 := false;
maxNumber := 0;
for i := 1 to 10 do
if (number mod 10 = 4) and (number > maxNumber) thenbegin
write('Enter a natural number: ');
readln(number);
begin
maxNumber := number;
hasNumberEndingWith4 := true;
end;
end;
if hasNumberEndingWith4 then
writeln('The maximum number ending with 4 is: ', maxNumber)
else
writeln('NO');
end.