package test;
//还没有优化它,你先看看吧,大楖差不多了…………
public class TreeSetDemo {
public static void main(String[] args) {
//move(9);
sjx(3,9);
sjx(6,6);
sjx(9,3);
zfx(4,11);
}
private static void zfx(int row,int col ){
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
System.out.print(" ");
}
for (int j = 0; j <row-1 ; j++) {
System.out.print("*");
}
System.out.println();
}
}
private static void sjx(int num,int move) {
for (int i = 0; i < num; i++) {
for (int j = 0; j < move; j++) {
System.out.print(" ");
}
for (int j = i; j < num; j++) {
System.out.print(" ");
}
for (int j = 0; j <=i; j++) {
System.out.print("* ");
}
System.out.println();
}
}
}
*
* *
* * *
*
* *
* * *
* * * *
* * * * *
* * * * * *
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *
***
***
***
***
|