关键难点:内循环的条件判断1
2
3
4
5
6
7
8
9public static void main(String[] args) {
        //九九乘法表
        for(int i = 1 ;i<=9;i++){
            for(int j = 1;j<=i;j++){
                System.out.print(j+"*"+i+"="+j*i+" ");
            }
            System.out.println("\n");
        }
    }
输出结果: