please help me in finding what is wrong with my array... its not sorting

thanks, thanks.

```
int main(){
int i,j,x,y;
int unsort[10] = { 34, 76, 12, 1, 56, 23, 65, 9089, 45, 63 };
//int sort[10];
for (i = 0; i < 10; i++){
cout<<unsort[i]<<" ";
}
for (j = 0; j < unsort[10-i-1]; j++){
if (unsort[j] > unsort[j+1]){
x = unsort[j];
unsort[j] = unsort[j+1];
unsort[j+1] = x;
}
}
//SORTED ARRAYS
for (y = 0; y < unsort[10]; y++)
cout <<unsort[y];
return 0;
}
```