九九乘法表

public Class Test {
    public static void main(String[] args){
//      1 * 1 = 1
//    	1 * 2 = 2 2 * 2 = 4
//    	1 * 3 = 3 2 * 3 = 6 3 * 3 = 9
        for(int i = 1; i <= 9; i++){
            for(int j = 1; j <= i; j++){
                System.out.print(i + "*" + j + "=" + (i*j) + " ");
            }
            System.out.println();
            //print不換行 println換行
        }
    }
}
相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息