最后一个元素后面无空格

for (int i = 0; i < n; i ++)
{
    
    
	if (i) cout << ' ';
	cout << a[i];
}

猜你喜欢

转载自blog.csdn.net/Shao_yihao/article/details/121151741