标签:
1 for(int i = 0 ;i <= 9 ; i++) 2 { 3 for(int a = 8;a >= i;a--) 4 { 5 System.out.print(" "); 6 } 7 for(int a = 0;a <= i;a++) 8 { 9 System.out.print("*"); 10 } 11 for(int a = 1;a <= i;a++) 12 { 13 System.out.print("*"); 14 } 15 System.out.println(); 16 } 17 for(int i = 0 ;i <= 9 ; i++) 18 { 19 for(int a = 0;a <= i;a++) 20 { 21 System.out.print(" "); 22 } 23 for(int a = 8;a >= i;a--) 24 { 25 System.out.print("*"); 26 } 27 for(int a = 7;a >= i;a--) 28 { 29 System.out.print("*"); 30 } 31 System.out.println(); 32 33 } 34 35
标签:
原文地址:http://www.cnblogs.com/name-hanlin/p/4854447.html