一个for循环写出9*9乘法表

public class ClassTest03 {
    public static void main(String[] args) {

        for(int i=1,j=1;j<=9;j++){
            if(i<j){
                i++;
                j=1;
                System.out.println("");
            }
            else{
                System.out.print(j+"*"+i+"="+i*j+"  ");
                //排版   低于两位数时多占一个空格
                if(i*j<10)
                System.out.print(" ");
            }
        }
    }
}
原文地址:https://www.cnblogs.com/chuijingjing/p/9431902.html