PROGRAM
Privet;
VAR
x:
real;
BEGIN
writeln(
'Который час?'); read(x);
if
x>
24 then
writeln(
'Введенное число не является временем ' )
else
begin
if
(x>=
8) and (x<12) then writeln('Доброе утро!');
if
(x>=
12) and (x<17) then writeln('Добрый день!');
if
(x>=
17) and (x<23) then writeln('Добрый вечер!');
if
(x>=
23) or (x<8) then writeln('Доброй ночи!');
end
;
end
.