/*
while循环
打印图像
*
*/
public class Zuoye1{
public static void main(String[] args) {
int i=1;
int j=1;
//int a=1;
//while循环使其产生四行
while (i<=4){
int a=1;
//while循环产生*前的空格
while(a<=4-i){
System.out.print(” “);
a++;
}
j=1;
//while循环产生*
while(j<=2*i-1){
System.out.print(“*”);
j++;
}
//输出换行
System.out.println();
i++;
}
}
}