请教大神:输出居中的倒三角形
程序代码:#include <stdio.h>
int main()
{
int n,i;
scanf("%d", &n);
while(n)
{
for(i=0;i<2*n-1;i++)
{
printf("#");
}
printf("\n");
n--;
}
return 0;
}示例输出结果:
5
#########
#######
#####
###
#
Press any key to continue
如何能让输出的这个三角形居中,变成如下这样:
5
#########
#######
#####
###
#
Press any key to continue









