当前位置: > enum用法实例C++...
题目
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.

提问时间:2021-03-21

答案
C++ Primer 已发送,请注意查收.
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.