paupau..
First of all, you dim'ed x as 11, ( 0 - 10 ), but only assigned 0 to 9 in the loop.
for (i=0;i<10;i++)
Second, the ending zero on the line was the first of the x[i] array from the next for loop. So, I added a newline before starting the second for loop. Also, there was no need to re-initialize the x[i] array, so I removed it.
Here is your program listing that runs under VC++ express 2008.
I'm use to other programming languages. So, to me, when when a variable gets bracketed by [], or (), it has more than one dimension. Sorry for the Freudian slip. I guess I should have just said, 'You created an array of 11 elements, but only assigned 10 of them, 0 through 9'. Thanks for bringing it to my attention. Writing things like that could just throw a new programmer.