In English, we greet people by “Good morning”, “Good afternoon” or “Good evening” depending on the time of day.
Write a program that given the current hour (in 24 hours format) prints a good morning, good afternoon or good evening message according to the following list:
Input will consist of several lines each with a single number h where
0 ≤ h < 24
For each line of input, output should contain a corresponding line with either:
Good morning
Good afternoon
Good evening
orHi
11
15
20
Good morning
Good afternoon
Good evening
try next: calc factorial triangle
Copyright © 2020-2021 Rudy Matela
This text is available under the CC BY-SA 4.0 license.
Originally available on cscx.org/good