package practiceGO;/* * * * ** * * * * *  * * ***** */public class Cto {	public static void main(String[] args) {		for(int i=0; i<5; i++){			for(int j=0; j<(i+1); j++){				if (i>=2 && i<=3) {					if (j==0 || j==i) {						System.out.print("*");					}else {						System.out.print(" ");					}				}else{					System.out.print("*");				}			}			System.out.println();		}	}}

运行结果:

**** **  ******