#include <stdio.h>
void tow(char ch,int N);
int main()
{
char ch;
int N;
printf("输入要打印的字符和打印的行数:");
scanf("%c %d",&ch,&N);
tow(ch,N);
return 0;
}
void tow(char ch,int N)
{
int i,j;
for(i=0;i<N;i++)
{
for(j=N-1;j>i;j--)
{
printf(" ");
}
for(j=0;j<=i;j++)
{
printf(" %c",ch);
}
printf("\n");
}
}