Re: [問題] 關於九九乘法的小變形..想不出來..

看板Programming作者 (prag)時間14年前 (2010/12/11 18:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
好久沒寫寫code了 這個算還好吧 不過就99乘法表跟畫 *** ** * 的綜合題罷了~~~ 附上java版.....細節自己修囉.... =============================== public class ccc { public static void main(String[] args) { int fixed=3; int k=fixed; for(int i=1;i<=fixed;i++) { for(int j=1;j<=fixed;j++) { if(j<=fixed-k) { System.out.print(" "); }else { System.out.print(j+"*"+i+"="+i*j+" "); } } k--;System.out.println(""); } } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 119.77.165.6
文章代碼(AID): #1D0rQpld (Programming)
文章代碼(AID): #1D0rQpld (Programming)