Originally Posted by
viperlasson
Bumping my thread for an updated version of this program. Now I need to not display any duplicates and count how many times a number was present in the array. It seems simple, but I can't understand where to reset the counter variable.
I have my counter in there, but I need to reset it back to one after it finishes counting duplicates of a number. Don't know if I am doing this right so far.
edit: Okay I'm solving it little by little, I just made it reset the counter after it prints the number + times it appeared, makes sense... Just now theres an issue where if you type in (1 1 1) it says it counts 4 duplicates in the array.
I also have another question... I made my program to use an array of only 3 numbers. What if the user enters as many as they want, then a certain number to quit and print results? I know a while loop will be needed, but how will I increase the array size each time the user enters a test score?