for(int x=1; x<=9;x++){//2.再使用后一个固定1的for循环包起来
for(int j=1;j<=x;j++){//1.第一步打印第一列 //3.把重复的项修改为j<=x
System.out.print(x+"*"+j+"="+(x*j) +"/t");
}
System.out.println();//4.调整样式
}
for循环实现九九乘法表
最新推荐文章于 2024-02-27 11:33:58 发布