#include<stdio.h> int main() { int n,a,b=0,c,x,i,j,k; printf("input n:"); scanf("%d",&n); x=2*n-1; k=0; a=0; for(i=x;i>0;i=i-2) { for(j=0;j<i;j++) {printf(" O\t");} printf("\n"); for(k;k>=1;k--) {printf("\t");} k=b; for(j=0;j<i;j++) {printf("<H>\t");} printf("\n"); for(k;k>=1;k--) {printf("\t");} k=b; for(j=0;j<i;j++) {printf("I I\t");} printf("\n\n"); k+=1; b=k; for(k;k>=1;k--) {printf("\t");} k=b; } return 0; }