1 public class text { 2 /** 3 * @param args 4 */ 5 public static void main(String[] args) { 6 // TODO Auto-generated method stub 7 int a=1; 8 while(a<25){ 9 int i=0; 10 while(i<a){ 11 System.out.print("*");//打印*不换行 12 i++; 13 } 14 System.out.println("");//换行 15 a++; 16 } 17 } 18 }
1 public class Work10 { 2 /** 3 * @param args 4 */ 5 public static void main(String[] args) { 6 // TODO Auto-generated method stub 7 int a=1; 8 while(a<25){ 9 int i=0; 10 while(i<a){ 11 System.out.print("*");//打印*不换行 12 i++; 13 } 14 System.out.println("");//换行 15 a++; 16 } 17 } 18 }