index | submit | rank | book

good1 – Good day (easy version)

In English, we greet people by “Good morning”, “Good afternoon” or “Good evening” depending on the time of day.

Good morning.  Good afternoon.  Good evening.

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 and Output

Input will consist with a single number h where 0 ≤ h < 24

Output should contain a single line with either:

Example input 1

11

Example output 1

Good morning

Example input 2

15

Example output 2

Good afternoon

Example input 3

20

Example outpu 3

Good evening

Scoring

try first: order1

try also: signum1

try next: factorial1 triangle1

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
This text is available under the CC BY-SA 4.0 license.
Originally available on cscx.org/good1