class test{
public static void main(String args[]){
int i,j;
i = 1;
j = 0;
while(i<10){
j=0;
while(j<i){
System.out.print("*");
j++;
}
System.out.println();
i++;
}
}
}
输出结果:
class test{
public static void main(String args[]){
int i,j;
i = 1;
j = 0;
while(i<10){
j=0;
while(j<i){
System.out.print("*");
j++;
}
System.out.println();
i++;
}
}
}
输出结果: