Read a sequence of words from cin and store the values a
vector. After you’ve read all the words, process the vector and change
each word to uppercase. Print the transformed elements, eight words to a
line.
And I don`t know how to do it with a getline so Here is what I did instead
Any for loop can be written as a while loop. If a while loop can be written as a for loop, it is common practice to write it as a for loop for easy readability (and just a different way of organizing/understanding the programming logic).