C++ program to generate random words