剛看到人提起的 本身寫了個 java
for (int i = 1,j = 1; i <= 9; j++) { System.out.print(j+"*"+i+"="+i*j+" "); if(j==i){ i++; j=0; System.out.println("");//換行 } }