题解 | #字符金字塔#
字符金字塔
http://www.nowcoder.com/practice/0fae60c3b5c64699b7c0f031c2187dde
#include<stdio.h>
int main()
{
char a;
scanf("%c",&a);
for(int i=1;i<=5;i++)
{
for (int b = 5 - i; b>0; b--)
printf(" ");
for(int c=1;c<=i;c++)
printf("%c ",a);
printf("\n");
}
return 0;
}
查看26道真题和解析
传音控股公司福利 317人发布