1x1=11x2=2 2x2=41x3=3 2x3=6 3x3=91x4=4 2x4=8 3x4=12 4x4=161x5=5 2x5=10 3x5=15 4x5=20 5x5=251x6=6 2x6=12 3x6=18 4x6=24 5x6=30 6x6=361x7=7 2x7=14 3x7=21 4x7=28 5x7=35 6x7=42 7x7=491x8=8 2x8=16 3x8=24 4x8=32 5x8=40 6x8=48 7x8=56 8x8=641x9=9 2x9=18 3x9=27 4x9=36 5x9=45 6x9=54 7x9=63 8x9=72 9x9=81
public static void main ( String [] args ) {????????for ( int i = 1 ; i <= 9 ; i ++ ){ // 打印 9 行????????????????for ( int j = 1 ; j <= i ; j ++ ){ //j<=i 表示列数的最大值就是行号????????????????????????//print表示在同一行中打印,也就是不会换行????????????????????????System . out . print ( j + " x " + i + " = " + i * j + "\t" );????????????????}????????????????System . out . println ();????????}}
该知识点属于Java SE的多重循环,参考文章:Java SE入门及基础(14)-CSDN博客
?