JAVA打印99乘法表

时间:2022-09-04 00:46:18

class Demo_Array   //创建对象
{
  public static void main(String[] args) {  
    for(int i = 1;i <= 9;i++ ) {      //循环
      for(int j = 1; j <= i; j++ ) {    //再循环
        System.out.print(i + " * " + j + " = " + i * j + " ");  //输出i*j结果
        }

      System.out.println(" ");  //换行
    }
  }
}