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 with a single number h where 0 ≤ h < 24
Output should contain a single line with either:
Good morning
Good afternoon
Good evening
orHi
11
Good morning
15
Good afternoon
20
Good evening
try first: order1
try also: signum1
try next: factorial1 triangle1
Copyright © 2020-2021 Rudy Matela
This text is available under the CC BY-SA 4.0 license.
Originally available on cscx.org/good1