0
点赞
收藏
分享

微信扫一扫

如何用Java输出乘法口诀表

芒果六斤半 2022-01-24 阅读 46
public class TestDemo3 {
    public static void main(String[] args) {
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(i+"*"+j+"="+i*j+" ");
            }
            System.out.println();
        }
    }
举报

相关推荐

0 条评论