package com.earl.struct;
public class ForDemo04 {
//练习三:打印九九乘法表
public static void main(String[] args) {
/*
1.打印第一列
2.多个循环
3.去掉重复项 i <= j
4.调整格式
*/
for (int j = 1; j <= 9; j++) {
for (int i = 1; i <= j; i++) {
System.out.print(j + "*" + i + "=" + (j*i) + "\t");
}
System.out.println();
}
}
}
标签:earl,ForDemo04,九九乘法,struct,打印,public
From: https://www.cnblogs.com/blogearl/p/17077472.html