九九乘法表

九九乘法表

//打印99乘法表

public class ForDemo04 {
    public static void main(String[] args) {
        //1.我们先打印第一列
        //2.我们把固定的1再用一个循环包起来
        //3.去掉重复项。 i <= j

        for (int j = 1; j <= 9; j++) {
            for (int i = 1; i <= j; i++) {
                System.out.print(i+"*"+j+"="+(i*j) + "	");
            }
            System.out.println();

        }

    }
}
原文地址:https://www.cnblogs.com/helloxiaolu/p/13255725.html