#include <iostream>
#include <algorithm>
#include<iomanip>
#include<stdlib.h>
#include<string.h>
#include <string>
#include<stdio.h>
#include<time.h>
#include<ctype.h>
using namespace std;

int main()
{
    time_t mytime;
    mytime = time(NULL);
    std::string ques, answer;
    
    cout << setw(75) << "Welcome To Talk Back\n\n";
    
    do
    {
    	cout << "So, What do you have in mind ? ";
    	std::getline (std::cin, ques);
    	std::cin.clear();
    	
    	//Convert string to uppercase
    	for (auto& character : ques)
    	{
    		character = toupper(character);
    	}

    	if (ques.find("TIME") != std::string::npos)
    	{
    		cout<<"\n\nThe Time and Date as of now is  : "<< ctime(&mytime);
    	}

    	std::cout << ques << std::endl;
    	
    	cout<<"Anything Else ? Y/N " << std::endl;
    	std::getline (std::cin, answer);
    	std::cin.clear();
    	std::cout << "Reply: " << answer << std::endl;
    }
    while ("Y" == answer || "y" == answer);

    return 0;
}