You made a small typo.
In the cout statement you your showing the value of x, which has been made 0 by the divisions.
You need to show the original valeu, stored in v[i].
So, please modify you cout statement to:
cout << v[i] << " ";
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…