/*
* 試利用for 迴圈撰寫出一個能產生如下圖結果的程式。請先繪製出流程圖後,根據流程
圖撰寫程式。
1
22
333
4444
55555
*/
public class P5_3_18 {
public static void main(String[] args) {
for(int i=1;i<6;i++){
for(int j=1;j<=i;j++){
System.out.print(i);

}System.out.println();
}

}

}

/*

1
22
333
4444
55555

*/

arrow
arrow
    文章標籤
    java
    全站熱搜

    goodlucky23 發表在 痞客邦 留言(0) 人氣()