public class work {
public static int i;
public static void main(String args[]){
String a="*";
System.out.println(a);
for(i=1;i<7;i++){ a="a+">
因為先從基本的開始練習,所以我把我剛練習完成的程式放上來,雖然很簡單不過我會繼續努力的.
如果有更好的寫法,希望可以交流一下,或者是我哪裡寫錯請一定要糾正.謝謝
java, c/c++, actionscript, perl, php, mysql, flex, flash......
public class work {
public static int i;
public static void main(String args[]){
String a="*";
System.out.println(a);
for(i=1;i<7;i++){ a="a+">
1 意見:
Good method. You just use only one for-loop. But what if the output is an inverse triangular tree. How can you implement it?
*****
****
***
**
*
Post a Comment