#include<stdio.h>
void main()
{
char a[9][9]={{'*','*','*','*','A','*','*','*','*',},{'*','*','*','A','B','C','*','*','*'},
{'*','*','A','C','C','D','E','*','*'},{'*','A','B','C','D','E','F','*','*'},{'A','B','C','D','E','F','G','H','I'},
};
int i,j;
for(i=0;i<=5;i++)
{
for(j=0;j<=8;j++)
printf("%c",a[i][j]);
printf("\n");
}
}
以上就是用for实现的三角型输出,感觉有点脱裤子放屁,但应该满足要求