#include <stdio.h>
int main()
{
int n,x=0,i=0; //n个,x行
char c;
scanf("%d %c",&n,&c);
if( (n%2) )
x = n/2+1;
else
x = n/2;
x=x-2;
while(i<n)
{
printf("%c",c);
i++;
}
printf("\n");
while(x!=0)
{
i=n-2;
printf("%c",c);
while(i!=0)
{
printf(" ");
i--;
}
printf("%c\n",c);
x--;
}
i=0;
while(i<n)
{
printf("%c",c);
i++;
}
return 0;
}
一緒にオバマ、Cと1036プログラミング
おすすめ
転載: blog.csdn.net/weixin_43916400/article/details/104520570
おすすめ
ランキング