The problem is with taking 'counter' and applying it to the for loops at the end of the program so that the output only shows the inputs, and not the rest of the blank array. I'm probably overthinking this, but advice would be nice.
I'm aware the cout<<counter<<endl is unnecessary, but it helps me visualize where the problem is.
What happens if the user enters a bunch of out of range values in the first loop? x keeps incrementing regardless and the values are still stored. Therefore when you reach line 30, 31 isn't there a possibility that some elements in arraySize are not acceptable as offsets into the other array?
Perhaps you want something more like this
1 2 3 4 5 6 7 8
int input = 0; // ensure that you start with something in range
for(int x = 0; x < ARRAY_SIZE; x++)
{
while(cin>>input && input >=0 && input<=99)
{
arraySize[x]=input;
}
}