I need to count the number of consecutive strings in an array called source and print them out. Here is an example of the output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Enter 10 words:
aa
aa
aa
aa
bb
cc
cc
cc
cc
aa
Enter lower and upper bound:
0 9
'aa' appeared 4 times.
'bb' appeared 1 times.
'cc' appeared 4 times.
'aa' appeared 1 times.
I have gotten my function to work mostly except the last time so it outputs the first three answers and then errors and doesn't output anything for the last.