Program greet; var h: integer; begin write('Час (0-23): '); readln(h); if (h >= 0) and (h <= 4) then writeln('Доброй ночи'); if (h >= 5) and (h <= 11) then writeln('Доброе утро'); if (h >= 12) and (h <= 16) then writeln('Добрый день'); if (h >= 17) and (h <= 23) then writeln('Добрый вечер'); end.
var
h: integer;
begin
write('Час (0-23): ');
readln(h);
if (h >= 0) and (h <= 4) then
writeln('Доброй ночи');
if (h >= 5) and (h <= 11) then
writeln('Доброе утро');
if (h >= 12) and (h <= 16) then
writeln('Добрый день');
if (h >= 17) and (h <= 23) then
writeln('Добрый вечер');
end.