well, sure you get this...
I didnt get what you are trying to do in lines # 15,16,17....
you are basically assigning holder =0 to every element of array except index 0....
However, you write: TenArray [index + 1] = holder;
You are trying to assign the current value of holder (0) into array position index+1, i.e. overwrite the 39 rather than store it.
Assignment operator copies value from the right to the left.
Besides, when index==0, this if (TenArray [index] < TenArray [index + 1])
is effectively this if ( 100 < 39 ) and that is why the 100 is the only one that survives the carnage.