Цитата:
Сообщение от manoichi
4.ввести час суток и соответственно ему вывести «доброе утро», «добрый день», «добрый вечер», «доброй ночи».
|
Код:
VAR
H:Byte;
BEGIN
Write('Enter the hour: ');
ReadLn(H);
If (H>4) and (H<=9) then WriteLn('Good morning!') else
If (H>9) and (H<=17) then WriteLn('Good afternoon!') else
If (H>17) and (H<=23) then WriteLn('Good evening!') else
WriteLn('Good night!');
ReadLn;
END.