题解 | #翻转金字塔图案#
#include<stdio.h>
int main() {
int n = 0;
while (scanf("%d", &n) != EOF) {
//行数
for (int i = 0; i < n; i++) {
//打印空格
for (int j = 0; j < i; j++) {
printf(" ");
}
//打印*
for (int k = 0; k < n - i; k++) {
printf("* ");
}
printf("\n");
}
}
return 0;
}