1 #include<stdio.h> 2 3 int main() 4 { 5 int n,i,j,t=0; 6 char c; 7 while(scanf("%c",&c)!=EOF&&c!='@') 8 { 9 scanf("%d",&n); 10 getchar(); 11 if(t++) 12 printf(" "); 13 for(i=0; i<n; ++i) 14 { 15 for(j=0; j<n-1-i; ++j) 16 printf(" "); 17 for(j=0; j<2*(i+1)-1; ++j) 18 if(i==n-1) 19 printf("%c",c); 20 else if(j==0||j==2*(i+1)-2) 21 printf("%c",c); 22 else 23 printf(" "); 24 printf(" "); 25 } 26 } 27 }