Multiplication table is something we often primary back, the following code to achieve a positive sequence output and reverse output of the multiplication table
Reverse output
package com.qianfeng.ls.jj;
public class Demo99 {
public static void main(String[] args) {
// 在控制台打印一个99乘法表
for(int i = 1 ; i <= 9 ; i++) {
//这个循环就是负责一行的内容【你需要换行吗?】
for(int j = 1 ; j <= i ; j++) {
System.out.print(j + "*" + i + "=" + i*j + "\t");
}
System.out.println();
}
}
}
Positive sequence output multiplication table
```java
package com.qianfeng.ls.jj;
public class Demo99 {
public static void main(String[] args) {
// 在控制台打印一个99乘法表
for(int i = 1 ; i <= 9 ; i++) {
//这个循环就是负责一行的内容【你需要换行吗?】
for(int j = 1 ; j <= i ; j++) {
System.out.print(j + "*" + i + "=" + i*j + "\t");
}
System.out.println();
}
}
}
`