enum用法实例C++帮忙写一个.————————————————————————————Key in a time of hour randomly,print good morning/noon/afternoon/evening/night respectively.Requirement:use Enumeration constant.No
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/28 14:55:09
![enum用法实例C++帮忙写一个.————————————————————————————Key in a time of hour randomly,print good morning/noon/afternoon/evening/night respectively.Requirement:use Enumeration constant.No](/uploads/image/z/10062919-55-9.jpg?t=enum%E7%94%A8%E6%B3%95%E5%AE%9E%E4%BE%8BC%2B%2B%E5%B8%AE%E5%BF%99%E5%86%99%E4%B8%80%E4%B8%AA.%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94%E2%80%94Key+in+a+time+of+hour+randomly%2Cprint+good+morning%2Fnoon%2Fafternoon%2Fevening%2Fnight+respectively.Requirement%3Ause+Enumeration+constant.No)
enum用法实例C++帮忙写一个.————————————————————————————Key in a time of hour randomly,print good morning/noon/afternoon/evening/night respectively.Requirement:use Enumeration constant.No
enum用法实例C++
帮忙写一个.
————————————————————————————
Key in a time of hour randomly,print good morning/noon/afternoon/evening/night respectively.
Requirement:use Enumeration constant.
Note that the roughly partition of a day is as follow:
1)Morning:The first or early part of the day,lasting from midnight to noon or from sunrise to noon.Six o'clock could be the start of the interval.
2)Noon:Twelve o'clock in the daytime; midday.
3)Afternoon:The part of day from noon until sunset.Say,after 13 o’clock.
4)Evening:The period of decreasing daylight between afternoon and night,after eighteen o’clock.
5)Night:The period between sunset and sunrise,especially the hours of darkness.To ensure the whole day and night are included,we suggest that it begin at 21 o’clock.
I/O Examples:
8
good morning.
12
good noon.
17
good afternoon.
19
good evening.
22
good night.
-1
the input is invalid.
Note that the input/output must follow the above format.
enum用法实例C++帮忙写一个.————————————————————————————Key in a time of hour randomly,print good morning/noon/afternoon/evening/night respectively.Requirement:use Enumeration constant.No
C++ Primer 已发送,请注意查收.