public class gsfgs {
public static void main(String[] args) {
int n = 5;//要打印的行数
for (int i = 0; i < n; i++) {
for (int j = 0; j < 2 * n; j++) {
if (j < n - i)
System.out.print(" ");
if (j >= n - i && j <= n + i)
System.out.print("*");
}
System.out.println();
}
}
}