for (int i = 1; i <= 5; i++) {
//最上面先是五个往下一次4.3.2.1
for (int j = 5; j >= i; j--) {
System.out.print(" ");
}
for (int j = 1; j <= i; j++) {
System.out.print("+");
}
for (int j = 1; j < i; j++) {
System.out.print("+");
}
System.out.println();
}
标签:Java,int,打印,System,控制台,三角形
From: https://www.cnblogs.com/lyhidea/p/16640846.html