#include <stdio.h>
int main(void)
{
char c ;
c =getchar();
int totalCount=c -‘a‘;
for (int count=0; count<= totalCount ; count++)
{
for(int i= totalCount ; i>count ; i--)
{
printf("%c",‘ ‘);
}
for (int i=0; i<=count ; i++)
{
printf("%c",‘a‘+i);
}
for (int u=count ;u>=0;u--)
{
printf("%c",‘a‘+u-1);
}
printf("\n");
}
}
原文地址:http://www.cnblogs.com/Mr573/p/3980257.html