第一題:
請撰寫一 Java 程式,用以輸出下列的九九乘法表。【25 分】
663063a2abae2.jpg

詳解 (共 4 筆)

robyhung
robyhung
詳解 #6280317
2024/12/31
public class Main{  ...
(共 465 字,隱藏中)
前往觀看
小書僮Roy
小書僮Roy
詳解 #6327338
2025/03/10
public class Multipl...
(共 373 字,隱藏中)
前往觀看
蔡恩林
蔡恩林
詳解 #6200716
2024/08/28
publicclass test99...
(共 200 字,隱藏中)
前往觀看
hchungw
hchungw
詳解 #6231687
2024/10/18
public class MultiplicationTable {
    public static void main(String[] args) {
        // Loop through columns
        for (int i = 1; i <= 9; i++) {
            // Loop through rows
            for (int j = 1; j <= 9; j++) {
                // Print each product with formatted output
                System.out.printf("%d★%d=%-2d ", j, i, i * j);
            }
            // Move to the next line after each column
            System.out.println();
        }
    }
}