题解 | #字符圣诞树#
字符圣诞树
https://www.nowcoder.com/practice/0fae60c3b5c64699b7c0f031c2187dde
#include <stdio.h> int main() { char a; int row; int lin; int b; scanf("%c",&a); for(row=4;row>=0;row--) { for(b=row;b>0;b--) { printf(" "); } for(lin=1;lin<=(5-row);lin++) { printf("%c ",a); } printf("\n"); } return 0; }