Basically, I have an assignment where I have to create a program that reads multiple lines of text from a user, prints out each different word and how many times each of these words was said. I then have to print each in Alphabetical order.
My code thus far is basically stuck on what to do if the word is already in the list I created to store the unique words. How do I change an entry?
Also, how would I go about printing each key on a new line? For example, 6 unique words, these are By, Caught, Fish, Me, The, Was, and I want to print each out on a separate line without knowing how many unique words there would be at the start as it takes user input which will be from my teacher after reading the code.