for循环实现,九九乘法表

package struct;

public class ForDemo04 {
public static void main(String[] args) {
//1.打印第一列
//2.再用一个循环包起来
//3.去掉重复项
//4.调整样式

for (int j = 0; j <= 9; j++) {
for (int i = 1; i <= j; i++) {
System.out.print(j+"*"+i+"="+(j*i)+"\t");
}
System.out.println();

}
}
}
posted @ 2021-08-25 16:54  AAA编程  阅读(123)  评论(0)    收藏  举报