zl程序教程

您现在的位置是:首页 >  Java

当前栏目

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

2023-02-18 16:24:05 时间
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();
        }
    }
}