charinfo(void)
{
charC;
printf("thisprogramwillshowyouadiamondshape,pleaseinputacharactor:");
scanf("%c",&C);
returnC;
}
voiddiamond(charC)
{
printf("\n");
printf("3个空格%c\n",C);
printf("2个空格%c%c%c\n",C,C,C);
printf("一个空格%c%c%c%c%c\n",C,C,C,C,C);
printf("%c%c%c%c%c%c%c\n",C,C,C,C,C,C,C);
printf("一个空格%c%c%c%c%c\n",C,C,C,C,C);
printf("2个空格%c%c%c\n",C,C,C);
printf("3个空格%c",C);
}
voidmain()
{
clrscr();
diamond(info());
getch();
}