#include
int main()
{
int hour,minute;
char ch;
printf("请输入现在的时刻<13:15>: ");
while(scanf("%d:%d",&hour,&minute)!=2||hour<0||hour>=24||minute<0||minute>=60)
{
printf("您的输入有误,请重新输入!!!\n");
while((ch=getchar())!='\n')
continue;
printf("请输入现在的时刻<13:15>: ");
}
getchar();
if(hour>=0&&hour<6)
printf("凌晨好!!!\n");
else if(hour<12)
printf("早上好!!!\n");
else if(hour<18)
printf("下午好!!!\n");
else if(hour<24)
printf("晚上好!!!\n");
return 0;
}