printf("%d ",a[i]) 改成printf("%4d ",a[i])或者printf("%5d ",a[i])对比一下空格长度,望采纳,谢谢!
printf("%d ",a[i])改成printf("%d\t",a[i]),即把空格改成\t