Hello everyone I am trying to do this assignment in the book: Write a program that reads four words (as character strings) and display them in increasing and decreasing alphabetical sequence.
I have done the 1st (easy) part but not sure how to go about displaying words in alphabetical order.
Here is what I’ve got so far:
int main()
{
string word1;
string word2;
string word3;
string word4;
string stringEval;
cout << "Enter four words using spaces between them: " << endl;
cin >> word1 >> word2 >> word3 >> word4;
Thank you for your help!