【0702作业】输出九九乘法表

 1 package com.workprojects;
 2 /**
 3  * 模拟九九乘法表(打印直角三角形)
 4  * @author L
 5  *
 6  */
 7 public class Work070203 {
 8     public static void main(String[] args) {
 9         for(int i =1;i<=9;i++) {
10             for(int j =1;j<=i;j++) {//j要小于i,否则会输出多余计算
11                 System.out.print(i+ "*" +j +"="+(i*j)+"\t");
12             }
13             System.out.println();
14         }
15     }
16 }

 

相关文章:

  • 2021-11-10
  • 2022-12-23
  • 2022-01-22
  • 2022-01-15
猜你喜欢
  • 2022-03-09
  • 2021-12-10
  • 2022-01-20
  • 2021-05-30
  • 2021-11-11
相关资源
相似解决方案