10/06/26 01:08:39
>>217
#include <stdio.h>
#include <time.h>
int main()
{
time_t now = time(NULL);
struct tm* local_now = localtime( &now );
const int hour = local_now->tm_hour;
if ( hour>4 && hour<=12 )
printf( "Good Morning!" );
else if ( hour>12 && hour<=20 )
printf( "Good Afternoon!" );
else // ( hour>20 && hour<=4 )
printf( "Good Evening!" );
return 0;
}