#include <stdio.h> void Print(int k, int x) //打印一行 { for (int i = 0; i < k; i++) { printf(" "); } for (int i = 0; i < x; i++) { printf("* "); } printf("\n"); } int main() { int n = 0; while(scanf("%d", &n) != EOF) { for (int i = 1; i <= n; i++) { Print(n - i, i); } } return 0; }