Re: [問題] 關於九九乘法的小變形..想不出來..
好久沒寫寫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
討論串 (同標題文章)
Programming 近期熱門文章
PTT數位生活區 即時熱門文章