#include<stdio.h> void tixin(int h) { int linewidth=h+(h-1)*2+1; int i,j; for(i=1;i<=h;i++) { for(j=1;j<=linewidth;j++) { if(j<linewidth-h-(i-1)*2) { putchar(' '); } else if(j<linewidth) { putchar('*'); } else { putchar(' '); } } } } int main(int argc,char** argv) { int h; while(scanf("%d",&h)!=EOF) { tixin(h); } return 0; } /************************************************************** Problem: 1065 Language: C Result: Accepted Time:80 ms Memory:904 kb ****************************************************************/