thanks for pointing that out. let me explain my thinking and maybe i can be pointed in the right direction. Since the user is allowed to input numbers between 0-100. I figured i could use the array to keep track of the occurrences. would this work? also i believe i would need to set all a[i] to 0 for all numbers first. If this is needed, how would i go about doing that?