Java基础系列(23)- 打印九九乘法表

package struct;

public class ForDemo03 {
    public static void main(String[] args) {
        
        for (int line = 1;line<=9;line++){
            for (int row = 1;row <= line;row++){
                System.out.print(line+"*"+row+"="+(line*row)+"\t");
            }
            System.out.println();
        }
    }
}

 

posted @ 2021-09-08 08:52  葛老头  阅读(45)  评论(0编辑  收藏  举报