Nov-14-2021, 12:57 PM
So something like
Start at the beginning of list, note the first word, call it active.
Move to the next word. If the same, increment a counter, otherwise call that count final and make this word the new active.
When you reach the end of the list, print out the list of words and counts.
Does that sound like what you want to do? If so, take each step and program that step. Once that is working move to the next step.
Start at the beginning of list, note the first word, call it active.
Move to the next word. If the same, increment a counter, otherwise call that count final and make this word the new active.
When you reach the end of the list, print out the list of words and counts.
Does that sound like what you want to do? If so, take each step and program that step. Once that is working move to the next step.