
Grariel
7 год назад
СРОЧНО
Даны время (два целых числа – часы и минуты). Вывести время суток. Будем считать, что: утро – от 6:30 до 10:00 ;день – от 10:01 до 16:30 ;вечер – от 16:31 до 22:00 ;ночь – от 22:01 до 6:29
Pascal ABC ИНФОРМАТИКА
ОТВЕТЫ

Горлов
Jul 16, 2019
var a, b: integer;
begin
writeln(Введите часы: );
readln(a);
writeln(Введите минуты: );
readln(b);
if (a gt; 6) and (a lt; 10) then writeln(Утро);
if (a = 10) and (b = 0) then writeln(Утро);
if (a = 6) and (b gt;= 30) then writeln(Утро);
if (a gt; 10) and (a lt; 16) then writeln(День);
if (a = 10) and (b gt;= 1) then writeln(День);
if (a = 16) and (b lt;= 30) then writeln(День);
if (a gt; 16) and (a lt; 22) then writeln(Вечер);
if (a = 22) and (b = 0) then writeln(Вечер);
if (a = 16) and (b gt;= 31) then writeln(Вечер);
if (a gt; 22) or (a lt; 6) then writeln(Ночь);
if (a = 22) and (b gt;= 1) then writeln(Ночь);
if (a = 6) and (b lt;= 30) then writeln(Ночь);
end.
begin
writeln(Введите часы: );
readln(a);
writeln(Введите минуты: );
readln(b);
if (a gt; 6) and (a lt; 10) then writeln(Утро);
if (a = 10) and (b = 0) then writeln(Утро);
if (a = 6) and (b gt;= 30) then writeln(Утро);
if (a gt; 10) and (a lt; 16) then writeln(День);
if (a = 10) and (b gt;= 1) then writeln(День);
if (a = 16) and (b lt;= 30) then writeln(День);
if (a gt; 16) and (a lt; 22) then writeln(Вечер);
if (a = 22) and (b = 0) then writeln(Вечер);
if (a = 16) and (b gt;= 31) then writeln(Вечер);
if (a gt; 22) or (a lt; 6) then writeln(Ночь);
if (a = 22) and (b gt;= 1) then writeln(Ночь);
if (a = 6) and (b lt;= 30) then writeln(Ночь);
end.
193