package com.humi.other;
public class PrintLX {
public static void main(String[] args){
for (int i = 0; i < 5; i++) {//上三角
for (int j = 5-i; j >0; j--) {
System.out.print(" ");
}
for (int j = 0; j <2*i-1; j++) {
System.out.print("*");
}
System.out.println();
}
for (int i = 5; i >0; i--) {//下三角
for (int j = 0; j <5-i; j++) {
System.out.print(" ");
}
for (int j = i; j >-(2*i-1)/2; j--) {
System.out.print("*");
}
System.out.println();
}
}
}