#include #include #include //for the functions time and localtime using namespace std; int main() { //Get the current hour of the day (0 to 23 inclusive). time_t t {time(nullptr)}; tm *p {localtime(&t)}; int hour {p->tm_hour}; if (hour < 12) { cout << "Good morning pal!"; } else if ( 13 <= hour <= 17 ) { cout << "Good afternoon partna."; } else { cout << "Good evening brotha."; } cout << "\n"; return EXIT_SUCCESS; }