1 void drowV(int hight){
2 int rowLen = (hight-1)*2;
3
4 for(int i=0; i<hight; i++){
5 int start = i;
6 int end = rowLen-i;
7 for(int j=0;j<=rowLen; j++){
8 if(j==end){
9 System.out.println("*");
10 break;
11 }
12 else if(j==start){
13 System.out.print("*");
14 }
15 else{
16 System.out.print(" ");
17 }
18 }
19 }
20}
21